remove deprecated uses of logEvent
This commit is contained in:
@@ -3,7 +3,7 @@ import {type AppBskyActorDefs, type AppBskyFeedDefs, AtUri} from '@atproto/api'
|
|||||||
import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query'
|
import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query'
|
||||||
|
|
||||||
import {useToggleMutationQueue} from '#/lib/hooks/useToggleMutationQueue'
|
import {useToggleMutationQueue} from '#/lib/hooks/useToggleMutationQueue'
|
||||||
import {logEvent, type LogEvents, toClout} from '#/lib/statsig/statsig'
|
import {type LogEvents, toClout} from '#/lib/statsig/statsig'
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
import {updatePostShadow} from '#/state/cache/post-shadow'
|
import {updatePostShadow} from '#/state/cache/post-shadow'
|
||||||
import {type Shadow} from '#/state/cache/types'
|
import {type Shadow} from '#/state/cache/types'
|
||||||
@@ -286,7 +286,7 @@ function usePostRepostMutation(
|
|||||||
{uri: string; cid: string; via?: {uri: string; cid: string}} // the post's uri and cid, and the repost uri/cid if present
|
{uri: string; cid: string; via?: {uri: string; cid: string}} // the post's uri and cid, and the repost uri/cid if present
|
||||||
>({
|
>({
|
||||||
mutationFn: ({uri, cid, via}) => {
|
mutationFn: ({uri, cid, via}) => {
|
||||||
logEvent('post:repost', {logContext, feedContext: feedContext})
|
logger.metric('post:repost', {logContext, feedContext: feedContext})
|
||||||
return agent.repost(uri, cid, via)
|
return agent.repost(uri, cid, via)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -299,7 +299,7 @@ function usePostUnrepostMutation(
|
|||||||
const agent = useAgent()
|
const agent = useAgent()
|
||||||
return useMutation<void, Error, {postUri: string; repostUri: string}>({
|
return useMutation<void, Error, {postUri: string; repostUri: string}>({
|
||||||
mutationFn: ({repostUri}) => {
|
mutationFn: ({repostUri}) => {
|
||||||
logEvent('post:unrepost', {logContext, feedContext: feedContext})
|
logger.metric('post:unrepost', {logContext, feedContext: feedContext})
|
||||||
return agent.deleteRepost(repostUri)
|
return agent.deleteRepost(repostUri)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -371,7 +371,7 @@ function useThreadMuteMutation() {
|
|||||||
{uri: string} // the root post's uri
|
{uri: string} // the root post's uri
|
||||||
>({
|
>({
|
||||||
mutationFn: ({uri}) => {
|
mutationFn: ({uri}) => {
|
||||||
logEvent('post:mute', {})
|
logger.metric('post:mute', {})
|
||||||
return agent.api.app.bsky.graph.muteThread({root: uri})
|
return agent.api.app.bsky.graph.muteThread({root: uri})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -381,7 +381,7 @@ function useThreadUnmuteMutation() {
|
|||||||
const agent = useAgent()
|
const agent = useAgent()
|
||||||
return useMutation<{}, Error, {uri: string}>({
|
return useMutation<{}, Error, {uri: string}>({
|
||||||
mutationFn: ({uri}) => {
|
mutationFn: ({uri}) => {
|
||||||
logEvent('post:unmute', {})
|
logger.metric('post:unmute', {})
|
||||||
return agent.api.app.bsky.graph.unmuteThread({root: uri})
|
return agent.api.app.bsky.graph.unmuteThread({root: uri})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user