diff options
author | Hailey <me@haileyok.com> | 2025-01-26 15:40:02 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-26 15:40:02 -0800 |
commit | ebb6d5cc0f8179a5d1b9b71fc5ea4a64fcb4baee (patch) | |
tree | 48bf149cc57c94e3e249b77476f7cf1878d7e41c /src/components/FeedInterstitials.tsx | |
parent | 355c50fc0fe97feb8b4ec4e29d47b725252088c7 (diff) | |
download | voidsky-ebb6d5cc0f8179a5d1b9b71fc5ea4a64fcb4baee.tar.zst |
env var tweaks (#7457)
* add new events * Discard changes to package.json * Discard changes to src/lib/constants.ts * Discard changes to src/state/feed-feedback.tsx * Discard changes to yarn.lock * remove unused event
Diffstat (limited to 'src/components/FeedInterstitials.tsx')
-rw-r--r-- | src/components/FeedInterstitials.tsx | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/components/FeedInterstitials.tsx b/src/components/FeedInterstitials.tsx index 268a5ff5b..926d27baa 100644 --- a/src/components/FeedInterstitials.tsx +++ b/src/components/FeedInterstitials.tsx @@ -196,6 +196,7 @@ export function SuggestedFollowsProfile({did}: {did: string}) { <ProfileGrid isSuggestionsLoading={isSuggestionsLoading} profiles={data?.suggestions ?? []} + recId={data?.recId} error={error} viewContext="profile" /> @@ -222,10 +223,12 @@ export function ProfileGrid({ isSuggestionsLoading, error, profiles, + recId, viewContext = 'feed', }: { isSuggestionsLoading: boolean profiles: AppBskyActorDefs.ProfileViewDetailed[] + recId?: number error: Error | null viewContext: 'profile' | 'feed' }) { @@ -249,12 +252,19 @@ export function ProfileGrid({ )) ) : error || !profiles.length ? null : ( <> - {profiles.slice(0, maxLength).map(profile => ( + {profiles.slice(0, maxLength).map((profile, index) => ( <ProfileCard.Link key={profile.did} profile={profile} onPress={() => { - logEvent('feed:interstitial:profileCard:press', {}) + logEvent('suggestedUser:press', { + logContext: + viewContext === 'feed' + ? 'InterstitialDiscover' + : 'InterstitialProfile', + recId, + position: index, + }) }} style={[ a.flex_1, @@ -282,6 +292,17 @@ export function ProfileGrid({ logContext="FeedInterstitial" shape="round" colorInverted + onFollow={() => { + logEvent('suggestedUser:follow', { + logContext: + viewContext === 'feed' + ? 'InterstitialDiscover' + : 'InterstitialProfile', + location: 'Card', + recId, + position: index, + }) + }} /> </ProfileCard.Header> <ProfileCard.Description profile={profile} numberOfLines={2} /> |