Skip to content

Commit

Permalink
signout on mobile (#1812)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaut authored Dec 7, 2021
1 parent ec2469e commit 3512dd1
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions packages/files-ui/src/Components/Layouts/AppNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ const AppNav = ({ navOpen, setNavOpen }: IAppNav) => {
className={classes.menuItem}
menuItems={[
{
onClick: () => signOut(),
onClick: signOut,
contents: (
<div
data-cy="menu-sign-out"
Expand Down Expand Up @@ -332,9 +332,7 @@ const AppNav = ({ navOpen, setNavOpen }: IAppNav) => {
<nav className={classes.navMenu}>
<Link
data-cy="link-home"
onClick={() => {
handleOnClick()
}}
onClick={handleOnClick}
className={classes.navItem}
to={ROUTE_LINKS.Drive("/")}
>
Expand Down Expand Up @@ -414,17 +412,31 @@ const AppNav = ({ navOpen, setNavOpen }: IAppNav) => {
size="small"
/>
</>
)
}
)}
</div>
)}
{!desktop && (
<div
onClick={() => setNavOpen(false)}
className={clsx(classes.blocker, {
active: navOpen
})}
></div>
<>
<div
onClick={() => setNavOpen(false)}
className={clsx(classes.blocker, {
active: navOpen
})}
/>
<div
data-cy="signout-nav"
className={classes.navItem}
onClick={() => {
handleOnClick()
signOut()
}}
>
<PowerDownSvg />
<Typography>
<Trans>Sign Out</Trans>
</Typography>
</div>
</>
)}
</section>
</>
Expand Down

0 comments on commit 3512dd1

Please sign in to comment.