SidebarItem: fix status priority, if graph is not cleaned up correctly

This commit is contained in:
Liam Fitzgerald 2021-11-02 13:43:13 -05:00
parent 2777bd9942
commit 743130829e

View File

@ -24,13 +24,13 @@ function useAssociationStatus(resource: string) {
const { count, each } = stats;
const hasNotifications = false;
const hasUnread = count > 0 || each.length > 0;
return hasNotifications
return !isSubscribed
? 'unsubscribed'
: hasNotifications
? 'notification'
: hasUnread
? 'unread'
: isSubscribed
? undefined
: 'unsubscribed';
: undefined;
}
function SidebarItemBase(props: {