Fix no-show logic
This commit is contained in:
@@ -37,7 +37,7 @@ export function Inner() {
|
|||||||
const trendingPrompt = Prompt.usePromptControl()
|
const trendingPrompt = Prompt.usePromptControl()
|
||||||
const {setTrendingDiscoverHidden} = useTrendingSettingsApi()
|
const {setTrendingDiscoverHidden} = useTrendingSettingsApi()
|
||||||
const {data: trending, error, isLoading} = useTrendingTopics()
|
const {data: trending, error, isLoading} = useTrendingTopics()
|
||||||
const noTopics = !isLoading && !error && !trending?.topics
|
const noTopics = !isLoading && !error && !trending?.topics?.length
|
||||||
|
|
||||||
return error || noTopics ? null : (
|
return error || noTopics ? null : (
|
||||||
<View
|
<View
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ function Inner() {
|
|||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const gutters = useGutters([0, 'compact'])
|
const gutters = useGutters([0, 'compact'])
|
||||||
const {data: trending, error, isLoading} = useTrendingTopics()
|
const {data: trending, error, isLoading} = useTrendingTopics()
|
||||||
const noTopics = !isLoading && !error && !trending?.topics
|
const noTopics = !isLoading && !error && !trending?.topics?.length
|
||||||
|
|
||||||
return error || noTopics ? null : (
|
return error || noTopics ? null : (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ function Inner() {
|
|||||||
const trendingPrompt = Prompt.usePromptControl()
|
const trendingPrompt = Prompt.usePromptControl()
|
||||||
const {setTrendingSidebarHidden} = useTrendingSettingsApi()
|
const {setTrendingSidebarHidden} = useTrendingSettingsApi()
|
||||||
const {data: trending, error, isLoading} = useTrendingTopics()
|
const {data: trending, error, isLoading} = useTrendingTopics()
|
||||||
const noTopics = !isLoading && !error && !trending?.topics
|
const noTopics = !isLoading && !error && !trending?.topics?.length
|
||||||
|
|
||||||
return error || noTopics ? null : (
|
return error || noTopics ? null : (
|
||||||
<>
|
<>
|
||||||
|
|||||||
Reference in New Issue
Block a user