interface: address hunter review

This commit is contained in:
Liam Fitzgerald 2021-11-04 11:02:50 -05:00
parent 743130829e
commit c2437a3e35

View File

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