diff --git a/src/apps/dashboard/AppLayout.tsx b/src/apps/dashboard/AppLayout.tsx index a5d5075ca8..3067a1f5ef 100644 --- a/src/apps/dashboard/AppLayout.tsx +++ b/src/apps/dashboard/AppLayout.tsx @@ -27,9 +27,9 @@ const AppLayout: FC = ({ const { user } = useApi(); const isSmallScreen = useMediaQuery((t: Theme) => t.breakpoints.up('sm')); - const isDrawerAvailable = !isSmallScreen + const isDrawerAvailable = Boolean(user) && !drawerlessPaths.some(path => location.pathname.startsWith(`/${path}`)); - const isDrawerOpen = isDrawerActive && isDrawerAvailable && Boolean(user); + const isDrawerOpen = isDrawerActive && isDrawerAvailable; const onToggleDrawer = useCallback(() => { setIsDrawerActive(!isDrawerActive); @@ -52,18 +52,22 @@ const AppLayout: FC = ({ }} > - + { + isDrawerAvailable && ( + + ) + } { { - user && ( + isDrawerAvailable && (