menu can close completely
This commit is contained in:
parent
f5ef6cdd57
commit
9022ab6020
1 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue