Merge branch 'tabs-bar-links' into 'develop'

Show nav bar links when in dashboard

See merge request soapbox-pub/soapbox-fe!926
merge-requests/928/merge
Alex Gleason 2021-12-20 21:56:45 +00:00
commit 6143f8ddfb
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -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