add create/delete logs
This commit is contained in:
@@ -159,6 +159,13 @@ export type LogEvents = {
|
|||||||
starterPack: string
|
starterPack: string
|
||||||
followCount: number
|
followCount: number
|
||||||
}
|
}
|
||||||
|
'starterPack:delete': {}
|
||||||
|
'starterPack:create': {
|
||||||
|
setName: boolean
|
||||||
|
setDescription: boolean
|
||||||
|
profilesCount: number
|
||||||
|
feedsCount: number
|
||||||
|
}
|
||||||
|
|
||||||
'test:all:always': {}
|
'test:all:always': {}
|
||||||
'test:all:sometimes': {}
|
'test:all:sometimes': {}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import {useQueryClient} from '@tanstack/react-query'
|
|||||||
import {HITSLOP_10} from 'lib/constants'
|
import {HITSLOP_10} from 'lib/constants'
|
||||||
import {createStarterPackList} from 'lib/generate-starterpack'
|
import {createStarterPackList} from 'lib/generate-starterpack'
|
||||||
import {CommonNavigatorParams, NavigationProp} from 'lib/routes/types'
|
import {CommonNavigatorParams, NavigationProp} from 'lib/routes/types'
|
||||||
|
import {logEvent} from 'lib/statsig/statsig'
|
||||||
import {enforceLen} from 'lib/strings/helpers'
|
import {enforceLen} from 'lib/strings/helpers'
|
||||||
import {isAndroid, isNative, isWeb} from 'platform/detection'
|
import {isAndroid, isNative, isWeb} from 'platform/detection'
|
||||||
import {invalidateActorStarterPacksQuery} from 'state/queries/actor-starter-packs'
|
import {invalidateActorStarterPacksQuery} from 'state/queries/actor-starter-packs'
|
||||||
@@ -342,8 +343,14 @@ function WizardInner({
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
const newRkey = new AtUri(res.uri).rkey
|
logEvent('starterPack:create', {
|
||||||
|
setName: state.name != null,
|
||||||
|
setDescription: state.description != null,
|
||||||
|
profilesCount: state.profiles.length,
|
||||||
|
feedsCount: state.feeds.length,
|
||||||
|
})
|
||||||
|
|
||||||
|
const newRkey = new AtUri(res.uri).rkey
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
navigation.replace('StarterPack', {
|
navigation.replace('StarterPack', {
|
||||||
name: currentAccount!.handle,
|
name: currentAccount!.handle,
|
||||||
@@ -374,6 +381,7 @@ function WizardInner({
|
|||||||
rkey,
|
rkey,
|
||||||
})
|
})
|
||||||
await invalidateQueries()
|
await invalidateQueries()
|
||||||
|
logEvent('starterPack:delete', {})
|
||||||
navigation.popToTop()
|
navigation.popToTop()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Toast.show(_(msg`Failed to delete starter pack`))
|
Toast.show(_(msg`Failed to delete starter pack`))
|
||||||
|
|||||||
Reference in New Issue
Block a user