kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Merge branch 'tabs-bar-links' into 'develop'
Show nav bar links when in dashboard See merge request soapbox-pub/soapbox-fe!926merge-requests/928/merge
commit
6143f8ddfb
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue