From b79b74918f19e0ebd6a3076fb59109ac935d6249 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 13 Apr 2022 18:15:23 -0500 Subject: [PATCH] Restore Dashboard links to navigation --- app/soapbox/components/sidebar-navigation.tsx | 7 ++++--- app/soapbox/components/thumb_navigation.tsx | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/soapbox/components/sidebar-navigation.tsx b/app/soapbox/components/sidebar-navigation.tsx index b15b2d72a..96411d6c3 100644 --- a/app/soapbox/components/sidebar-navigation.tsx +++ b/app/soapbox/components/sidebar-navigation.tsx @@ -17,6 +17,7 @@ const SidebarNavigation = () => { const account = useAppSelector((state) => state.accounts.get(me)); 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 dashboardCount = useAppSelector((state) => state.admin.openReports.count() + state.admin.awaitingApproval.count()); const baseURL = getBaseURL(ImmutableMap(account)); const features = getFeatures(instance); @@ -70,14 +71,14 @@ const SidebarNavigation = () => { ) )} - {/* {(account && account.staff) && ( + {(account && account.staff) && ( } count={dashboardCount} /> - )} */} + )} {(account && instance.invites_enabled) && ( { const account = useOwnAccount(); 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 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)); return ( @@ -57,14 +57,14 @@ const ThumbNavigation: React.FC = (): JSX.Element => { ) )} - {/* (account && account.staff && ( + {(account && account.staff) && ( } to='/admin' count={dashboardCount} /> - ) */} + )} ); };