Skip to content

Commit

Permalink
fix(web): use Link in MenuItem (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Dec 5, 2021
1 parent 496056c commit bcdc85c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
18 changes: 14 additions & 4 deletions web/components/Header.tsx
Expand Up @@ -155,10 +155,20 @@ function HeaderContent() {
backgroundColor={"transparent"}
/>
<MenuList>
<MenuItem onClick={() => (location.href = `/user/${user.id}`)}>Open My Page</MenuItem>
<MenuItem onClick={() => window.open(user.spreadsheetUrl, "_blank")}>Open SpreadSheet</MenuItem>
<MenuItem onClick={() => (location.href = `/philan/budget`)}>View Budgets</MenuItem>
<MenuItem onClick={() => (location.href = `/philan/edit`)}>Edit Profile</MenuItem>
<MenuItem>
<Link href={`/user/${user.id}`}>Open My Page</Link>
</MenuItem>
<MenuItem>
<Link href={user.spreadsheetUrl} isExternal={true}>
Open SpreadSheet
</Link>
</MenuItem>
<MenuItem>
<Link href={`/philan/budget`}>View Budgets</Link>
</MenuItem>
<MenuItem>
<Link href={`/philan/edit`}>Edit Profile</Link>
</MenuItem>
</MenuList>
</Menu>
) : null;
Expand Down
10 changes: 8 additions & 2 deletions web/pages/philan/created.tsx
Expand Up @@ -42,8 +42,14 @@ export default function Created() {
backgroundColor={"transparent"}
/>
<MenuList>
<MenuItem onClick={() => (location.href = `/user/${user.id}`)}>Open My Page</MenuItem>
<MenuItem onClick={() => window.open(user.spreadsheetUrl, "_blank")}>Open SpreadSheet</MenuItem>
<MenuItem>
<Link href={`/user/${user.id}`}>Open My Page</Link>
</MenuItem>
<MenuItem>
<Link href={user.spreadsheetUrl} isExternal={true}>
Open SpreadSheet
</Link>
</MenuItem>
</MenuList>
</Menu>
) : null;
Expand Down

0 comments on commit bcdc85c

Please sign in to comment.