From af44a9e8291fbc405826da9cc530256ebfae690c Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Thu, 6 May 2021 13:22:09 +1000 Subject: [PATCH] interface: hide group feed if disabled --- .../landscape/components/Sidebar/SidebarListHeader.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/interface/src/views/landscape/components/Sidebar/SidebarListHeader.tsx b/pkg/interface/src/views/landscape/components/Sidebar/SidebarListHeader.tsx index f3c9a67e6..edcda928e 100644 --- a/pkg/interface/src/views/landscape/components/Sidebar/SidebarListHeader.tsx +++ b/pkg/interface/src/views/landscape/components/Sidebar/SidebarListHeader.tsx @@ -52,9 +52,9 @@ export function SidebarListHeader(props: { const noun = (props.workspace?.type === 'messages') ? 'Messages' : 'Channels'; - let feedPath: any = ''; - if (metadata?.config && 'group' in metadata.config) { - feedPath = metadata.config.group ?? ''; + let feedPath: any = null; + if ('group' in metadata?.config && typeof metadata.config.group === 'string') { + feedPath = metadata.config.group; } const unreadCount = useHarkState( @@ -63,7 +63,7 @@ export function SidebarListHeader(props: { return ( - {( feedPath) ? ( + {( !!feedPath) ? (