From 90ed779cc3c39ab8bf7dc99abcf8f85293a6cd86 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 17 Dec 2024 13:15:15 -0600 Subject: [PATCH] Fix no-show logic --- src/components/interstitials/Trending.tsx | 2 +- src/screens/Search/components/ExploreTrendingTopics.tsx | 2 +- src/view/shell/desktop/SidebarTrendingTopics.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/interstitials/Trending.tsx b/src/components/interstitials/Trending.tsx index a19d1dfd80..cec5e45c6a 100644 --- a/src/components/interstitials/Trending.tsx +++ b/src/components/interstitials/Trending.tsx @@ -37,7 +37,7 @@ export function Inner() { const trendingPrompt = Prompt.usePromptControl() const {setTrendingDiscoverHidden} = useTrendingSettingsApi() const {data: trending, error, isLoading} = useTrendingTopics() - const noTopics = !isLoading && !error && !trending?.topics + const noTopics = !isLoading && !error && !trending?.topics?.length return error || noTopics ? null : ( diff --git a/src/view/shell/desktop/SidebarTrendingTopics.tsx b/src/view/shell/desktop/SidebarTrendingTopics.tsx index 8ca9b63f4e..55324687f9 100644 --- a/src/view/shell/desktop/SidebarTrendingTopics.tsx +++ b/src/view/shell/desktop/SidebarTrendingTopics.tsx @@ -36,7 +36,7 @@ function Inner() { const trendingPrompt = Prompt.usePromptControl() const {setTrendingSidebarHidden} = useTrendingSettingsApi() const {data: trending, error, isLoading} = useTrendingTopics() - const noTopics = !isLoading && !error && !trending?.topics + const noTopics = !isLoading && !error && !trending?.topics?.length return error || noTopics ? null : ( <>