From b08b8656e931529dc9f2907408ea3b5346205fa5 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Thu, 4 Jan 2024 01:13:28 -0500 Subject: [PATCH] Fix drawer showing on all pages and item details padding --- src/apps/dashboard/AppLayout.tsx | 20 ++++++++++++-------- src/apps/experimental/AppLayout.tsx | 2 +- src/apps/experimental/AppOverrides.scss | 8 ++++++-- 3 files changed, 19 insertions(+), 11 deletions(-) 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 && (