Skip to content

Commit

Permalink
Merge pull request #109 from hotosm/feat/view-profile
Browse files Browse the repository at this point in the history
feat: Show user details on profile section
  • Loading branch information
nrjadkry authored Aug 1, 2024
2 parents 1c945a4 + d95f01d commit 3f1738b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/frontend/src/components/Dashboard/DashboardSidebar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { useNavigate } from 'react-router-dom';
import { Flex, FlexColumn } from '@Components/common/Layouts';
import { Flex, FlexColumn, FlexRow } from '@Components/common/Layouts';
import { Button } from '@Components/RadixComponents/Button';
import { getLocalStorageValue } from '@Utils/getLocalStorageValue';

export default function DashboardSidebar() {
const navigate = useNavigate();

const userDetails = getLocalStorageValue('userprofile');

return (
<FlexColumn className="naxatw-col-span-1 naxatw-items-center naxatw-rounded-lg naxatw-border naxatw-border-grey-400 naxatw-bg-white naxatw-p-2.5">
<Flex className="naxatw-h-20 naxatw-w-20 naxatw-items-center naxatw-justify-center naxatw-overflow-hidden naxatw-rounded-full naxatw-bg-grey-600">
Expand All @@ -22,6 +21,16 @@ export default function DashboardSidebar() {
>
Edit Profile
</Button>
<FlexColumn className="naxatw-my-5 naxatw-w-full naxatw-gap-2">
<FlexRow className="naxatw-gap-1">
<div className="naxatw-w-[120px]">Name</div>:
<div>{userDetails?.name}</div>
</FlexRow>
<FlexRow className="naxatw-gap-1">
<div className="naxatw-w-[120px]">Email</div>:
<div className="naxatw-break-words">{userDetails?.email}</div>
</FlexRow>
</FlexColumn>
</FlexColumn>
);
}

0 comments on commit 3f1738b

Please sign in to comment.