shouldRenderLargeMenu
This commit is contained in:
parent
9022ab6020
commit
9503829e18
1 changed files with 5 additions and 6 deletions
|
@ -239,13 +239,12 @@ function SideNavigation(props: Props) {
|
||||||
}
|
}
|
||||||
}, [hideMenuFromView]);
|
}, [hideMenuFromView]);
|
||||||
|
|
||||||
const shouldRenderLargeMenuPushorAbsolute = menuCanCloseCompletely || sidebarOpen;
|
const shouldRenderLargeMenu = menuCanCloseCompletely || sidebarOpen;
|
||||||
|
|
||||||
const showMicroMenu = !sidebarOpen && !menuCanCloseCompletely;
|
const showMicroMenu = !sidebarOpen && !menuCanCloseCompletely;
|
||||||
const showPushMenu = sidebarOpen && !menuCanCloseCompletely;
|
const showPushMenu = sidebarOpen && !menuCanCloseCompletely;
|
||||||
|
|
||||||
const showSubscriptionSection =
|
const showSubscriptionSection = shouldRenderLargeMenu && isPersonalized && subscriptions && subscriptions.length > 0;
|
||||||
shouldRenderLargeMenuPushorAbsolute && isPersonalized && subscriptions && subscriptions.length > 0;
|
|
||||||
const showTagSection = sidebarOpen && isPersonalized && followedTags && followedTags.length;
|
const showTagSection = sidebarOpen && isPersonalized && followedTags && followedTags.length;
|
||||||
|
|
||||||
let displayedSubscriptions = subscriptions;
|
let displayedSubscriptions = subscriptions;
|
||||||
|
@ -434,7 +433,7 @@ function SideNavigation(props: Props) {
|
||||||
<ul
|
<ul
|
||||||
className={classnames('navigation-links', {
|
className={classnames('navigation-links', {
|
||||||
'navigation-links--micro': showMicroMenu,
|
'navigation-links--micro': showMicroMenu,
|
||||||
'navigation-links--absolute': shouldRenderLargeMenuPushorAbsolute,
|
'navigation-links--absolute': shouldRenderLargeMenu,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{getLink(HOME)}
|
{getLink(HOME)}
|
||||||
|
@ -445,7 +444,7 @@ function SideNavigation(props: Props) {
|
||||||
<ul
|
<ul
|
||||||
className={classnames('navigation-links', {
|
className={classnames('navigation-links', {
|
||||||
'navigation-links--micro': showMicroMenu,
|
'navigation-links--micro': showMicroMenu,
|
||||||
'navigation-links--absolute': shouldRenderLargeMenuPushorAbsolute,
|
'navigation-links--absolute': shouldRenderLargeMenu,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{EXTRA_SIDEBAR_LINKS && (
|
{EXTRA_SIDEBAR_LINKS && (
|
||||||
|
@ -467,7 +466,7 @@ function SideNavigation(props: Props) {
|
||||||
{!isAuthenticated && sidebarOpen && unAuthNudge}
|
{!isAuthenticated && sidebarOpen && unAuthNudge}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{(!canDisposeMenu || sidebarOpen) && shouldRenderLargeMenuPushorAbsolute && helpLinks}
|
{(!canDisposeMenu || sidebarOpen) && shouldRenderLargeMenu && helpLinks}
|
||||||
</nav>
|
</nav>
|
||||||
<div
|
<div
|
||||||
className={classnames('navigation__overlay', {
|
className={classnames('navigation__overlay', {
|
||||||
|
|
Loading…
Reference in a new issue