Restore Dashboard links to navigation
This commit is contained in:
parent
a0a02a2700
commit
b79b74918f
|
@ -17,6 +17,7 @@ const SidebarNavigation = () => {
|
||||||
const account = useAppSelector((state) => state.accounts.get(me));
|
const account = useAppSelector((state) => state.accounts.get(me));
|
||||||
const notificationCount = useAppSelector((state) => state.notifications.get('unread'));
|
const notificationCount = useAppSelector((state) => state.notifications.get('unread'));
|
||||||
const chatsCount = useAppSelector((state) => state.chats.get('items').reduce((acc: any, curr: any) => acc + Math.min(curr.get('unread', 0), 1), 0));
|
const chatsCount = useAppSelector((state) => state.chats.get('items').reduce((acc: any, curr: any) => acc + Math.min(curr.get('unread', 0), 1), 0));
|
||||||
|
const dashboardCount = useAppSelector((state) => state.admin.openReports.count() + state.admin.awaitingApproval.count());
|
||||||
|
|
||||||
const baseURL = getBaseURL(ImmutableMap(account));
|
const baseURL = getBaseURL(ImmutableMap(account));
|
||||||
const features = getFeatures(instance);
|
const features = getFeatures(instance);
|
||||||
|
@ -70,14 +71,14 @@ const SidebarNavigation = () => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* {(account && account.staff) && (
|
{(account && account.staff) && (
|
||||||
<SidebarNavigationLink
|
<SidebarNavigationLink
|
||||||
to='/admin'
|
to='/admin'
|
||||||
icon={location.pathname.startsWith('/admin') ? require('icons/dashboard-filled.svg') : require('@tabler/icons/icons/dashboard.svg')}
|
icon={require('@tabler/icons/icons/dashboard.svg')}
|
||||||
text={<FormattedMessage id='tabs_bar.dashboard' defaultMessage='Dashboard' />}
|
text={<FormattedMessage id='tabs_bar.dashboard' defaultMessage='Dashboard' />}
|
||||||
count={dashboardCount}
|
count={dashboardCount}
|
||||||
/>
|
/>
|
||||||
)} */}
|
)}
|
||||||
|
|
||||||
{(account && instance.invites_enabled) && (
|
{(account && instance.invites_enabled) && (
|
||||||
<SidebarNavigationLink
|
<SidebarNavigationLink
|
||||||
|
|
|
@ -9,7 +9,7 @@ const ThumbNavigation: React.FC = (): JSX.Element => {
|
||||||
const account = useOwnAccount();
|
const account = useOwnAccount();
|
||||||
const notificationCount = useAppSelector((state) => state.notifications.unread);
|
const notificationCount = useAppSelector((state) => state.notifications.unread);
|
||||||
const chatsCount = useAppSelector((state) => state.chats.get('items').reduce((acc: number, curr: any) => acc + Math.min(curr.get('unread', 0), 1), 0));
|
const chatsCount = useAppSelector((state) => state.chats.get('items').reduce((acc: number, curr: any) => acc + Math.min(curr.get('unread', 0), 1), 0));
|
||||||
// const dashboardCount = useAppSelector((state) => state.admin.openReports.count() + state.admin.awaitingApproval.count());
|
const dashboardCount = useAppSelector((state) => state.admin.openReports.count() + state.admin.awaitingApproval.count());
|
||||||
const features = getFeatures(useAppSelector((state) => state.instance));
|
const features = getFeatures(useAppSelector((state) => state.instance));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -57,14 +57,14 @@ const ThumbNavigation: React.FC = (): JSX.Element => {
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* (account && account.staff && (
|
{(account && account.staff) && (
|
||||||
<ThumbNavigationLink
|
<ThumbNavigationLink
|
||||||
src={require('@tabler/icons/icons/dashboard.svg')}
|
src={require('@tabler/icons/icons/dashboard.svg')}
|
||||||
text={<FormattedMessage id='navigation.dashboard' defaultMessage='Dashboard' />}
|
text={<FormattedMessage id='navigation.dashboard' defaultMessage='Dashboard' />}
|
||||||
to='/admin'
|
to='/admin'
|
||||||
count={dashboardCount}
|
count={dashboardCount}
|
||||||
/>
|
/>
|
||||||
) */}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue