Include recId with log event for suggested profiles (#10075)
This commit is contained in:
@@ -521,6 +521,7 @@ export type Events = {
|
|||||||
| 'InterstitialProfile'
|
| 'InterstitialProfile'
|
||||||
| 'Profile'
|
| 'Profile'
|
||||||
| 'Onboarding'
|
| 'Onboarding'
|
||||||
|
recId?: number | string
|
||||||
}
|
}
|
||||||
'suggestedUser:dismiss': {
|
'suggestedUser:dismiss': {
|
||||||
logContext: 'InterstitialDiscover' | 'InterstitialProfile'
|
logContext: 'InterstitialDiscover' | 'InterstitialProfile'
|
||||||
|
|||||||
@@ -215,13 +215,14 @@ export function SuggestedFollows({feed}: {feed: FeedDescriptor}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function SuggestedFollowsProfile({did}: {did: string}) {
|
export function SuggestedFollowsProfile({did}: {did: string}) {
|
||||||
const {profiles, onDismiss, isLoading, error} =
|
const {profiles, recId, onDismiss, isLoading, error} =
|
||||||
useSuggestedFollowsByActorWithDismiss({did})
|
useSuggestedFollowsByActorWithDismiss({did})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ProfileGrid
|
<ProfileGrid
|
||||||
isSuggestionsLoading={isLoading}
|
isSuggestionsLoading={isLoading}
|
||||||
profiles={profiles}
|
profiles={profiles}
|
||||||
|
recId={recId}
|
||||||
error={error}
|
error={error}
|
||||||
viewContext="profile"
|
viewContext="profile"
|
||||||
onDismiss={onDismiss}
|
onDismiss={onDismiss}
|
||||||
@@ -275,6 +276,7 @@ export function ProfileGrid({
|
|||||||
isSuggestionsLoading,
|
isSuggestionsLoading,
|
||||||
error,
|
error,
|
||||||
profiles,
|
profiles,
|
||||||
|
recId,
|
||||||
totalProfileCount,
|
totalProfileCount,
|
||||||
viewContext = 'feed',
|
viewContext = 'feed',
|
||||||
onDismiss,
|
onDismiss,
|
||||||
@@ -283,6 +285,7 @@ export function ProfileGrid({
|
|||||||
}: {
|
}: {
|
||||||
isSuggestionsLoading: boolean
|
isSuggestionsLoading: boolean
|
||||||
profiles: {actor: bsky.profile.AnyProfileView; recId?: string}[]
|
profiles: {actor: bsky.profile.AnyProfileView; recId?: string}[]
|
||||||
|
recId?: string
|
||||||
totalProfileCount?: number
|
totalProfileCount?: number
|
||||||
error: Error | null
|
error: Error | null
|
||||||
viewContext: 'profile' | 'profileHeader' | 'feed'
|
viewContext: 'profile' | 'profileHeader' | 'feed'
|
||||||
@@ -572,6 +575,7 @@ export function ProfileGrid({
|
|||||||
followDialogControl.open()
|
followDialogControl.open()
|
||||||
ax.metric('suggestedUser:seeMore', {
|
ax.metric('suggestedUser:seeMore', {
|
||||||
logContext: isFeedContext ? 'Explore' : 'Profile',
|
logContext: isFeedContext ? 'Explore' : 'Profile',
|
||||||
|
recId,
|
||||||
})
|
})
|
||||||
}}>
|
}}>
|
||||||
{({hovered}) => (
|
{({hovered}) => (
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ export function useSuggestedFollowsByActorWithDismiss({
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
profiles,
|
profiles,
|
||||||
|
recId: data?.recId,
|
||||||
onDismiss,
|
onDismiss,
|
||||||
isLoading,
|
isLoading,
|
||||||
error,
|
error,
|
||||||
|
|||||||
Reference in New Issue
Block a user