about summary refs log tree commit diff
path: root/src/view/screens/Search/Explore.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/screens/Search/Explore.tsx')
-rw-r--r--src/view/screens/Search/Explore.tsx20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/view/screens/Search/Explore.tsx b/src/view/screens/Search/Explore.tsx
index c5af9607b..520e103a4 100644
--- a/src/view/screens/Search/Explore.tsx
+++ b/src/view/screens/Search/Explore.tsx
@@ -10,6 +10,7 @@ import {
 import {msg, Trans} from '@lingui/macro'
 import {useLingui} from '@lingui/react'
 
+import {logEvent} from '#/lib/statsig/statsig'
 import {cleanError} from '#/lib/strings/errors'
 import {logger} from '#/logger'
 import {isNative, isWeb} from '#/platform/detection'
@@ -259,6 +260,7 @@ type ExploreScreenItems =
       type: 'profile'
       key: string
       profile: AppBskyActorDefs.ProfileView
+      recId?: number
     }
   | {
       type: 'feed'
@@ -383,6 +385,7 @@ export function Explore() {
               type: 'profile',
               key: actor.did,
               profile: actor,
+              recId: page.recId,
             })
           }
         }
@@ -511,7 +514,7 @@ export function Explore() {
   ])
 
   const renderItem = React.useCallback(
-    ({item}: {item: ExploreScreenItems}) => {
+    ({item, index}: {item: ExploreScreenItems; index: number}) => {
       switch (item.type) {
         case 'header': {
           return (
@@ -540,6 +543,21 @@ export function Explore() {
                 noBg
                 noBorder
                 showKnownFollowers
+                onPress={() => {
+                  logEvent('suggestedUser:press', {
+                    logContext: 'Explore',
+                    recId: item.recId,
+                    position: index,
+                  })
+                }}
+                onFollow={() => {
+                  logEvent('suggestedUser:follow', {
+                    logContext: 'Explore',
+                    location: 'Card',
+                    recId: item.recId,
+                    position: index,
+                  })
+                }}
               />
             </View>
           )