diff --git a/src/screens/StarterPack/StarterPackLandingScreen.tsx b/src/screens/StarterPack/StarterPackLandingScreen.tsx index 643a7221..7dda45f9 100644 --- a/src/screens/StarterPack/StarterPackLandingScreen.tsx +++ b/src/screens/StarterPack/StarterPackLandingScreen.tsx @@ -31,10 +31,12 @@ import {atoms as a, useTheme} from '#/alf' import {Button, ButtonText} from '#/components/Button' import {useDialogControl} from '#/components/Dialog' import * as FeedCard from '#/components/FeedCard' +import {useRichText} from '#/components/hooks/useRichText' import {LinearGradientBackground} from '#/components/LinearGradientBackground' import {ListMaybePlaceholder} from '#/components/Lists' import {Default as ProfileCard} from '#/components/ProfileCard' import * as Prompt from '#/components/Prompt' +import {RichText} from '#/components/RichText' import {Text} from '#/components/Typography' const AnimatedPressable = Animated.createAnimatedComponent(Pressable) @@ -82,9 +84,15 @@ export function LandingScreen({ return } + // Just for types, this cannot be hit + if (!AppBskyGraphStarterpack.isRecord(starterPack.record)) { + return null + } + return ( @@ -93,22 +101,25 @@ export function LandingScreen({ function LandingScreenLoaded({ starterPack, + starterPackRecord: record, setScreenState, // TODO apply this to profile card moderationOpts, }: { starterPack: AppBskyGraphDefs.StarterPackView + starterPackRecord: AppBskyGraphStarterpack.Record setScreenState: (state: LoggedOutScreenState) => void moderationOpts: ModerationOpts }) { - const {record, creator, listItemsSample, feeds} = starterPack + const {creator, listItemsSample, feeds} = starterPack const {_} = useLingui() const t = useTheme() const activeStarterPack = useActiveStarterPack() const setActiveStarterPack = useSetActiveStarterPack() const {isTabletOrDesktop} = useWebMediaQueries() const androidDialogControl = useDialogControl() + const [descriptionRt] = useRichText(record.description || '') const [appClipOverlayVisible, setAppClipOverlayVisible] = React.useState(false) @@ -147,10 +158,6 @@ function LandingScreenLoaded({ } } - if (!AppBskyGraphStarterpack.isRecord(record)) { - return null - } - return ( {record.description ? ( - - {record.description} - + ) : null}