diff options
author | Eric Bailey <git@esb.lol> | 2024-12-18 13:37:46 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-18 11:37:46 -0800 |
commit | e7b015f53fd777654326ed0b30174c09673312ef (patch) | |
tree | 82910d8a1faf77fa45076ceaab139dcaa2f4e2d5 /src/components/interstitials/Trending.tsx | |
parent | 05c43ed998430fb7d8d2a57bed54f2f24c71dd88 (diff) | |
download | voidsky-e7b015f53fd777654326ed0b30174c09673312ef.tar.zst |
Trending tracking (#7161)
* Add hide to Explore * Event for show * Add hide events to each location
Diffstat (limited to 'src/components/interstitials/Trending.tsx')
-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> ) |