From c2437a3e35bd3b18873aa19259e0860a47a60e80 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Thu, 4 Nov 2021 11:02:50 -0500 Subject: [PATCH] interface: address hunter review --- .../landscape/components/Sidebar/SidebarItem.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pkg/interface/src/views/landscape/components/Sidebar/SidebarItem.tsx b/pkg/interface/src/views/landscape/components/Sidebar/SidebarItem.tsx index 98b723d9f..0b050ed0b 100644 --- a/pkg/interface/src/views/landscape/components/Sidebar/SidebarItem.tsx +++ b/pkg/interface/src/views/landscape/components/Sidebar/SidebarItem.tsx @@ -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: {