Use dangerousIsType
This commit is contained in:
@@ -43,6 +43,7 @@ import {News2_Stroke2_Corner0_Rounded as News} from '#/components/icons/News2'
|
|||||||
import {Trending2_Stroke2_Corner2_Rounded as Trending} from '#/components/icons/Trending2'
|
import {Trending2_Stroke2_Corner2_Rounded as Trending} from '#/components/icons/Trending2'
|
||||||
import {Loader} from '#/components/Loader'
|
import {Loader} from '#/components/Loader'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
|
import * as atp from '#/types/atproto'
|
||||||
|
|
||||||
export function StepFinished() {
|
export function StepFinished() {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
@@ -198,7 +199,12 @@ export function StepFinished() {
|
|||||||
onboardDispatch({type: 'finish'})
|
onboardDispatch({type: 'finish'})
|
||||||
logEvent('onboarding:finished:nextPressed', {
|
logEvent('onboarding:finished:nextPressed', {
|
||||||
usedStarterPack: Boolean(starterPack),
|
usedStarterPack: Boolean(starterPack),
|
||||||
starterPackName: AppBskyGraphStarterpack.isRecord(starterPack?.record)
|
starterPackName:
|
||||||
|
starterPack &&
|
||||||
|
atp.dangerousIsType<AppBskyGraphStarterpack.Record>(
|
||||||
|
starterPack.record,
|
||||||
|
AppBskyGraphStarterpack.isRecord,
|
||||||
|
)
|
||||||
? starterPack.record.name
|
? starterPack.record.name
|
||||||
: undefined,
|
: undefined,
|
||||||
starterPackCreator: starterPack?.creator.did,
|
starterPackCreator: starterPack?.creator.did,
|
||||||
|
|||||||
Reference in New Issue
Block a user