diff --git a/app/soapbox/components/dropdown_menu.tsx b/app/soapbox/components/dropdown_menu.tsx
index 4bd747d0a..8086eb276 100644
--- a/app/soapbox/components/dropdown_menu.tsx
+++ b/app/soapbox/components/dropdown_menu.tsx
@@ -24,6 +24,7 @@ export interface MenuItem {
newTab?: boolean,
isLogout?: boolean,
icon: string,
+ count?: number,
destructive?: boolean,
}
@@ -174,7 +175,7 @@ class DropdownMenu extends React.PureComponent;
}
- const { text, href, to, newTab, isLogout, icon, destructive } = option;
+ const { text, href, to, newTab, isLogout, icon, count, destructive } = option;
return (
@@ -191,7 +192,14 @@ class DropdownMenu extends React.PureComponent
{icon && }
+
{text}
+
+ {count ? (
+
+ {count}
+
+ ) : null}
);
diff --git a/app/soapbox/components/sidebar-navigation.tsx b/app/soapbox/components/sidebar-navigation.tsx
index 132b439df..9809d99c1 100644
--- a/app/soapbox/components/sidebar-navigation.tsx
+++ b/app/soapbox/components/sidebar-navigation.tsx
@@ -20,7 +20,7 @@ const SidebarNavigation = () => {
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 followRequestsCount = useAppSelector((state) => state.user_lists.getIn(['follow_requests', 'items'], ImmutableOrderedSet()).count());
- // 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 baseURL = account ? getBaseURL(account) : '';
const features = getFeatures(instance);
@@ -76,8 +76,7 @@ const SidebarNavigation = () => {
to: '/admin',
icon: require('@tabler/icons/icons/dashboard.svg'),
text: ,
- // TODO: let menu items have a counter
- // count: dashboardCount,
+ count: dashboardCount,
});
}
@@ -160,6 +159,7 @@ const SidebarNavigation = () => {
}
/>