diff options
Diffstat (limited to 'src/components/interstitials')
-rw-r--r-- | src/components/interstitials/Trending.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/components/interstitials/Trending.tsx b/src/components/interstitials/Trending.tsx index 3944d92f0..ff41797f4 100644 --- a/src/components/interstitials/Trending.tsx +++ b/src/components/interstitials/Trending.tsx @@ -1,7 +1,9 @@ +import React from 'react' import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' +import {logEvent} from '#/lib/statsig/statsig' import { useTrendingSettings, useTrendingSettingsApi, @@ -39,6 +41,11 @@ export function Inner() { const {data: trending, error, isLoading} = useTrendingTopics() const noTopics = !isLoading && !error && !trending?.topics?.length + const onConfirmHide = React.useCallback(() => { + logEvent('trendingTopics:hide', {context: 'interstitial'}) + setTrendingDisabled(true) + }, [setTrendingDisabled]) + return error || noTopics ? null : ( <View style={[ @@ -104,7 +111,7 @@ export function Inner() { title={_(msg`Hide trending topics?`)} description={_(msg`You can update this later from your settings.`)} confirmButtonCta={_(msg`Hide`)} - onConfirm={() => setTrendingDisabled(true)} + onConfirm={onConfirmHide} /> </View> ) |