isRecord above
This commit is contained in:
@@ -84,9 +84,15 @@ export function LandingScreen({
|
|||||||
return <ListMaybePlaceholder isLoading={true} />
|
return <ListMaybePlaceholder isLoading={true} />
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Just for types, this cannot be hit
|
||||||
|
if (!AppBskyGraphStarterpack.isRecord(starterPack.record)) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<LandingScreenLoaded
|
<LandingScreenLoaded
|
||||||
starterPack={starterPack}
|
starterPack={starterPack}
|
||||||
|
starterPackRecord={starterPack.record}
|
||||||
setScreenState={setScreenState}
|
setScreenState={setScreenState}
|
||||||
moderationOpts={moderationOpts}
|
moderationOpts={moderationOpts}
|
||||||
/>
|
/>
|
||||||
@@ -95,25 +101,25 @@ export function LandingScreen({
|
|||||||
|
|
||||||
function LandingScreenLoaded({
|
function LandingScreenLoaded({
|
||||||
starterPack,
|
starterPack,
|
||||||
|
starterPackRecord: record,
|
||||||
setScreenState,
|
setScreenState,
|
||||||
// TODO apply this to profile card
|
// TODO apply this to profile card
|
||||||
|
|
||||||
moderationOpts,
|
moderationOpts,
|
||||||
}: {
|
}: {
|
||||||
starterPack: AppBskyGraphDefs.StarterPackView
|
starterPack: AppBskyGraphDefs.StarterPackView
|
||||||
|
starterPackRecord: AppBskyGraphStarterpack.Record
|
||||||
setScreenState: (state: LoggedOutScreenState) => void
|
setScreenState: (state: LoggedOutScreenState) => void
|
||||||
moderationOpts: ModerationOpts
|
moderationOpts: ModerationOpts
|
||||||
}) {
|
}) {
|
||||||
const {record, creator, listItemsSample, feeds} = starterPack
|
const {creator, listItemsSample, feeds} = starterPack
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const activeStarterPack = useActiveStarterPack()
|
const activeStarterPack = useActiveStarterPack()
|
||||||
const setActiveStarterPack = useSetActiveStarterPack()
|
const setActiveStarterPack = useSetActiveStarterPack()
|
||||||
const {isTabletOrDesktop} = useWebMediaQueries()
|
const {isTabletOrDesktop} = useWebMediaQueries()
|
||||||
const androidDialogControl = useDialogControl()
|
const androidDialogControl = useDialogControl()
|
||||||
const [descriptionRt] = useRichText(
|
const [descriptionRt] = useRichText(record.description || '')
|
||||||
AppBskyGraphStarterpack.isRecord(record) ? record?.description || '' : '',
|
|
||||||
)
|
|
||||||
|
|
||||||
const [appClipOverlayVisible, setAppClipOverlayVisible] =
|
const [appClipOverlayVisible, setAppClipOverlayVisible] =
|
||||||
React.useState(false)
|
React.useState(false)
|
||||||
@@ -152,10 +158,6 @@ function LandingScreenLoaded({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AppBskyGraphStarterpack.isRecord(record)) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CenteredView style={a.flex_1}>
|
<CenteredView style={a.flex_1}>
|
||||||
<ScrollView
|
<ScrollView
|
||||||
|
|||||||
Reference in New Issue
Block a user