Use dangerousIsType
This commit is contained in:
@@ -26,6 +26,7 @@ import {Divider} from '#/components/Divider'
|
|||||||
import {LinearGradientBackground} from '#/components/LinearGradientBackground'
|
import {LinearGradientBackground} from '#/components/LinearGradientBackground'
|
||||||
import {InlineLinkText} from '#/components/Link'
|
import {InlineLinkText} from '#/components/Link'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
|
import * as atp from '#/types/atproto'
|
||||||
|
|
||||||
export function Signup({onPressBack}: {onPressBack: () => void}) {
|
export function Signup({onPressBack}: {onPressBack: () => void}) {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
@@ -95,7 +96,10 @@ export function Signup({onPressBack}: {onPressBack: () => void}) {
|
|||||||
scrollable>
|
scrollable>
|
||||||
<View testID="createAccount" style={a.flex_1}>
|
<View testID="createAccount" style={a.flex_1}>
|
||||||
{showStarterPackCard &&
|
{showStarterPackCard &&
|
||||||
AppBskyGraphStarterpack.isRecord(starterPack.record) ? (
|
atp.dangerousIsType<AppBskyGraphStarterpack.Record>(
|
||||||
|
starterPack.record,
|
||||||
|
AppBskyGraphStarterpack.isRecord,
|
||||||
|
) ? (
|
||||||
<Animated.View entering={!isFetchedAtMount ? FadeIn : undefined}>
|
<Animated.View entering={!isFetchedAtMount ? FadeIn : undefined}>
|
||||||
<LinearGradientBackground
|
<LinearGradientBackground
|
||||||
style={[a.mx_lg, a.p_lg, a.gap_sm, a.rounded_sm]}>
|
style={[a.mx_lg, a.p_lg, a.gap_sm, a.rounded_sm]}>
|
||||||
|
|||||||
Reference in New Issue
Block a user