Skip to content

Commit

Permalink
fix: sign in button on mobile view menu drawer (#1566)
Browse files Browse the repository at this point in the history
* push relog

* fix

Co-authored-by: Labib Imam Hidayat <[email protected]>
  • Loading branch information
labibimamhidayat and Labib Imam Hidayat authored Nov 18, 2022
1 parent 6ac0a4f commit 2001420
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/Mobile/MenuDrawer/MenuDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ export const MenuDrawerComponent: React.FC = () => {
logout();
};

const handleLoginOrCreateAccount = () => {
router.push('/login');
};

const openMenu = (item: MenuDetail) => () => {
if (item.url === '/wallet' && !user) {
setOpenPromptDrawer(true);
Expand Down Expand Up @@ -158,8 +162,8 @@ export const MenuDrawerComponent: React.FC = () => {
{/* network */}
<div className={style.wallet}>
<ShowIf condition={anonymous}>
<Button variant="contained" color="primary" onClick={handleSignOut}>
Sign in to connect wallet
<Button variant="contained" color="primary" onClick={handleLoginOrCreateAccount}>
Sign in or Create an Account
</Button>
</ShowIf>
<ShowIf condition={!anonymous}>
Expand Down

0 comments on commit 2001420

Please sign in to comment.