Skip to content

Commit

Permalink
feat: add edit profile button to profile page (#634)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregogun committed Jul 28, 2022
1 parent 0db7bcd commit ad2f94f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/five-dancers-float.md
@@ -0,0 +1,5 @@
---
'@sigle/app': minor
---

Add edit button to profile page.
10 changes: 10 additions & 0 deletions sigle/src/modules/publicHome/components/PublicHome.tsx
Expand Up @@ -31,6 +31,8 @@ import { StoryCard } from '../../storyCard/StoryCard';
import { useGetUserByAddress } from '../../../hooks/users';
import { DashboardLayout } from '../../layout';
import { AppHeader } from '../../layout/components/AppHeader';
import { Pencil1Icon } from '@radix-ui/react-icons';
import Link from 'next/link';

const ExtraInfoLink = styled('a', {
color: '$gray9',
Expand Down Expand Up @@ -221,6 +223,14 @@ export const PublicHome = ({ file, settings, userInfo }: PublicHomeProps) => {
</Button>
)
) : null}
{user && user.username === userInfo.username && (
<Link href="/settings" passHref>
<Button as="a" css={{ gap: '$2' }} variant="subtle">
Edit profile
<Pencil1Icon />
</Button>
</Link>
)}
</Flex>
<Flex align="center" gap="3">
<Typography css={{ fontWeight: 700 }} as="h1" size="h2">
Expand Down

0 comments on commit ad2f94f

Please sign in to comment.