Show nav bar links when in dashboard
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
829744dcce
commit
5979aa14f8
|
@ -53,10 +53,10 @@ class TabsBar extends React.PureComponent {
|
|||
return pathname === '/' || pathname.startsWith('/timeline/');
|
||||
}
|
||||
|
||||
onProfilePage = () => {
|
||||
shouldShowLinks = () => {
|
||||
try {
|
||||
const { pathname } = this.context.router.route.location;
|
||||
return pathname.startsWith('/@') && !pathname.includes('/posts/');
|
||||
return (pathname.startsWith('/@') && !pathname.includes('/posts/')) || pathname.startsWith('/admin');
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ class TabsBar extends React.PureComponent {
|
|||
render() {
|
||||
const { intl, account, logo, onOpenCompose, onOpenSidebar, features, dashboardCount, notificationCount, chatsCount } = this.props;
|
||||
const { collapsed } = this.state;
|
||||
const profilePage = this.onProfilePage();
|
||||
const showLinks = this.shouldShowLinks();
|
||||
|
||||
const classes = classNames('tabs-bar', {
|
||||
'tabs-bar--collapsed': collapsed,
|
||||
|
@ -94,7 +94,7 @@ class TabsBar extends React.PureComponent {
|
|||
<div className='tabs-bar__split tabs-bar__split--right'>
|
||||
{account ? (
|
||||
<>
|
||||
{profilePage && (
|
||||
{showLinks && (
|
||||
<>
|
||||
<NavLink key='notifications' className='tabs-bar__link' to='/notifications' data-preview-title-id='column.notifications'>
|
||||
<IconWithCounter
|
||||
|
|
Loading…
Reference in New Issue