menu can close completely

This commit is contained in:
Max Kotlan 2021-12-13 16:28:45 -05:00 committed by Thomas Zarebczan
parent f5ef6cdd57
commit 9022ab6020

View file

@ -221,8 +221,8 @@ function SideNavigation(props: Props) {
const isAbsolute = isOnFilePage || isMediumScreen; const isAbsolute = isOnFilePage || isMediumScreen;
const isMobile = useIsMobile(); const isMobile = useIsMobile();
const menuCanCloseCompletey = isOnFilePage || isMobile; const menuCanCloseCompletely = isOnFilePage || isMobile;
const hideMenuFromView = menuCanCloseCompletey && !sidebarOpen; const hideMenuFromView = menuCanCloseCompletely && !sidebarOpen;
const [canDisposeMenu, setCanDisposeMenu] = React.useState(false); const [canDisposeMenu, setCanDisposeMenu] = React.useState(false);
@ -239,10 +239,10 @@ function SideNavigation(props: Props) {
} }
}, [hideMenuFromView]); }, [hideMenuFromView]);
const shouldRenderLargeMenuPushorAbsolute = menuCanCloseCompletey || sidebarOpen; const shouldRenderLargeMenuPushorAbsolute = menuCanCloseCompletely || sidebarOpen;
const showMicroMenu = !sidebarOpen && !menuCanCloseCompletey; const showMicroMenu = !sidebarOpen && !menuCanCloseCompletely;
const showPushMenu = sidebarOpen && !menuCanCloseCompletey; const showPushMenu = sidebarOpen && !menuCanCloseCompletely;
const showSubscriptionSection = const showSubscriptionSection =
shouldRenderLargeMenuPushorAbsolute && isPersonalized && subscriptions && subscriptions.length > 0; shouldRenderLargeMenuPushorAbsolute && isPersonalized && subscriptions && subscriptions.length > 0;