diff --git a/client/src/components/ProfileSideBar.tsx b/client/src/components/ProfileSideBar.tsx new file mode 100644 index 0000000..16a2867 --- /dev/null +++ b/client/src/components/ProfileSideBar.tsx @@ -0,0 +1,105 @@ +import React from 'react' +import RatingStats from './RatingStats' +import EditIcon from '@mui/icons-material/Edit' +import LocationOnIcon from '@mui/icons-material/LocationOn' +import PhonelinkRingIcon from '@mui/icons-material/PhonelinkRing' +import PersonAddAlt1Icon from '@mui/icons-material/PersonAddAlt1' +import MyLocationIcon from '@mui/icons-material/MyLocation' +import AccountCircleIcon from '@mui/icons-material/AccountCircle' + +interface ProductCardProps { + editable: boolean + isFarmer: boolean +} + +const ProfileSideBar: React.FC = ({ editable, isFarmer }) => { + return ( +
+
+
+ +
+
+

Mariam Khatoon

+ {editable ? ( +
+ +
+ ) : ( +
+ +
+ )} +
+ {isFarmer && ( +
+ Family farmer. Apples, berries, litchis. Quality, sustainable + practices. +
+ )} +
+ + +971 50 243 0978 +
+
+ + Flat 503, Sapphire Building, Silicon Oasis, Dubai, United Arab + Emirates +
+
+ +
+
+ Lat: 25.1279° N +
+
+ Long: 55.3863° E +
+
+
+
+
+ {isFarmer ? ( + + ) : ( +
+

My following

+
+
+ + Mariam Khatoon +
+
+ + Mariam Khatoon +
+
+ + Mariam Khatoon +
+
+ + Mariam Khatoon +
+
+ + Mariam Khatoon +
+
+ + Mariam Khatoon +
+
+
+ )} +
+
+
+ ) +} + +export default ProfileSideBar diff --git a/client/src/pages/FarmerProfile.tsx b/client/src/pages/FarmerProfile.tsx index dda8ed9..5a56415 100644 --- a/client/src/pages/FarmerProfile.tsx +++ b/client/src/pages/FarmerProfile.tsx @@ -1,76 +1,56 @@ import React from 'react' -import RatingStats from '../components/RatingStats' import ProductSlider from '../components/ProductSlider' import CommentSection from '../components/CommentSection' import LocationMap from '../components/LocationMap' -import LocationOnIcon from '@mui/icons-material/LocationOn' -import PhonelinkRingIcon from '@mui/icons-material/PhonelinkRing' +import StoreNavbar from '../components/StoreNavbar' +import LogoutIcon from '@mui/icons-material/Logout' import ArrowBackIcon from '@mui/icons-material/ArrowBack' -import EditIcon from '@mui/icons-material/Edit' +import ProfileSideBar from '../components/ProfileSideBar' const FarmerProfile = () => { + const editable = true // true only if farmer is veiwing his own profile return ( -
-
- -

Back

-
-
-
-
-
- -
-
-

Mariam Khatoon

-
- -
-
-
- Family farmer. Apples, berries, litchis. Quality, sustainable - practices. -
-
- - +971 50 243 0978 -
-
- - Flat 503, Sapphire Building, Silicon Oasis, Dubai, United Arab - Emirates -
-
- -
+
+ {!editable && } +
+
+
+ +

Back

-
-
- + {editable && ( +
+ +

Logout

-
-

- Location on Map -

-
- + )} +
+
+
+ +
+
+ +
+
+

+ Location on Map +

+
+ +
+
+
+
-
-
-
-
)