From 6eac66c3fa49b0ccce367dda5e54f41e6d751087 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Wed, 18 Dec 2024 23:19:28 +0000 Subject: [PATCH] Don't hide recommended --- .../components/ExploreRecommendations.tsx | 29 ++----------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/src/screens/Search/components/ExploreRecommendations.tsx b/src/screens/Search/components/ExploreRecommendations.tsx index 098df09071..44ab1770fa 100644 --- a/src/screens/Search/components/ExploreRecommendations.tsx +++ b/src/screens/Search/components/ExploreRecommendations.tsx @@ -1,14 +1,7 @@ -import React from 'react' import {View} from 'react-native' -import {msg, Trans} from '@lingui/macro' -import {useLingui} from '@lingui/react' +import {Trans} from '@lingui/macro' -import {logEvent} from '#/lib/statsig/statsig' import {isWeb} from '#/platform/detection' -import { - useTrendingSettings, - useTrendingSettingsApi, -} from '#/state/preferences/trending' import { DEFAULT_LIMIT as RECOMMENDATIONS_COUNT, useTrendingTopics, @@ -16,7 +9,6 @@ import { import {useTrendingConfig} from '#/state/trending-config' import {atoms as a, useGutters, useTheme} from '#/alf' import {Hashtag_Stroke2_Corner0_Rounded} from '#/components/icons/Hashtag' -import * as Prompt from '#/components/Prompt' import { TrendingTopic, TrendingTopicLink, @@ -26,23 +18,14 @@ import {Text} from '#/components/Typography' export function ExploreRecommendations() { const {enabled} = useTrendingConfig() - const {trendingDisabled} = useTrendingSettings() - return enabled && !trendingDisabled ? : null + return enabled ? : null } function Inner() { const t = useTheme() - const {_} = useLingui() const gutters = useGutters([0, 'compact']) const {data: trending, error, isLoading} = useTrendingTopics() const noRecs = !isLoading && !error && !trending?.suggested?.length - const {setTrendingDisabled} = useTrendingSettingsApi() - const trendingPrompt = Prompt.usePromptControl() - - const onConfirmHide = React.useCallback(() => { - logEvent('trendingTopics:hide', {context: 'explore:recommendations'}) - setTrendingDisabled(true) - }, [setTrendingDisabled]) return error || noRecs ? null : ( <> @@ -106,14 +89,6 @@ function Inner() { )} - - ) }