diff --git a/src/components/FeedInterstitials.tsx b/src/components/FeedInterstitials.tsx index 8f6405b94a..734cc1cd00 100644 --- a/src/components/FeedInterstitials.tsx +++ b/src/components/FeedInterstitials.tsx @@ -7,7 +7,7 @@ import {useLingui} from '@lingui/react' import {useNavigation} from '@react-navigation/native' import {type NavigationProp} from '#/lib/routes/types' -import {logEvent} from '#/lib/statsig/statsig' +import {logEvent, useGate} from '#/lib/statsig/statsig' import {logger} from '#/logger' import {isIOS} from '#/platform/detection' import {useModerationOpts} from '#/state/preferences/moderation-opts' @@ -429,12 +429,14 @@ export function ProfileGrid({ }) { const t = useTheme() const {_} = useLingui() + const gate = useGate() const moderationOpts = useModerationOpts() const {gtMobile} = useBreakpoints() const isLoading = isSuggestionsLoading || !moderationOpts const isProfileHeaderContext = viewContext === 'profileHeader' const isFeedContext = viewContext === 'feed' + const showDismissButton = gate('suggested_users_dismiss') && onDismiss const maxLength = gtMobile ? 3 : isProfileHeaderContext ? 12 : 6 const minLength = gtMobile ? 3 : 4 @@ -494,40 +496,39 @@ export function ProfileGrid({ (hovered || pressed) && t.atoms.border_contrast_high, ]}> - {onDismiss && ( + {showDismissButton && ( )} diff --git a/src/lib/statsig/gates.ts b/src/lib/statsig/gates.ts index aa839542f2..0860f9a00d 100644 --- a/src/lib/statsig/gates.ts +++ b/src/lib/statsig/gates.ts @@ -9,5 +9,6 @@ export type Gate = | 'onboarding_add_video_feed' | 'onboarding_suggested_starterpacks' | 'remove_show_latest_button' + | 'suggested_users_dismiss' | 'test_gate_1' | 'test_gate_2' diff --git a/src/logger/metrics.ts b/src/logger/metrics.ts index 8eb9d7b5b2..90e59f7ff1 100644 --- a/src/logger/metrics.ts +++ b/src/logger/metrics.ts @@ -336,7 +336,9 @@ export type MetricEvents = { } 'suggestedUser:dismiss': { logContext: 'InterstitialDiscover' | 'InterstitialProfile' + recId?: number position: number + suggestedDid: string } 'profile:unfollow': { logContext: