diff options
author | Hailey <me@haileyok.com> | 2024-06-27 19:35:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-27 19:35:20 -0700 |
commit | 91c4aa7c2dc598dd5e2c828e44c0d2c94cf0967d (patch) | |
tree | 362f79f88bab8107053c1fe0201ddcb4d0d21ac5 /src/screens/StarterPack/StarterPackLandingScreen.tsx | |
parent | 030c8e268e161bebe360e3ad97b1c18bd8425ca8 (diff) | |
download | voidsky-91c4aa7c2dc598dd5e2c828e44c0d2c94cf0967d.tar.zst |
Handle pressing all go.bsky.app links in-app w/ resolution (#4680)
Diffstat (limited to 'src/screens/StarterPack/StarterPackLandingScreen.tsx')
-rw-r--r-- | src/screens/StarterPack/StarterPackLandingScreen.tsx | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/src/screens/StarterPack/StarterPackLandingScreen.tsx b/src/screens/StarterPack/StarterPackLandingScreen.tsx index df13885e8..12420333d 100644 --- a/src/screens/StarterPack/StarterPackLandingScreen.tsx +++ b/src/screens/StarterPack/StarterPackLandingScreen.tsx @@ -31,6 +31,7 @@ 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 {ChevronLeft_Stroke2_Corner0_Rounded} from '#/components/icons/Chevron' import {LinearGradientBackground} from '#/components/LinearGradientBackground' import {ListMaybePlaceholder} from '#/components/Lists' import {Default as ProfileCard} from '#/components/ProfileCard' @@ -58,7 +59,11 @@ export function LandingScreen({ const moderationOpts = useModerationOpts() const activeStarterPack = useActiveStarterPack() - const {data: starterPack, isError: isErrorStarterPack} = useStarterPackQuery({ + const { + data: starterPack, + isError: isErrorStarterPack, + isFetching, + } = useStarterPackQuery({ uri: activeStarterPack?.uri, }) @@ -74,7 +79,7 @@ export function LandingScreen({ } }, [isErrorStarterPack, setScreenState, isValid, starterPack]) - if (!starterPack || !isValid || !moderationOpts) { + if (isFetching || !starterPack || !isValid || !moderationOpts) { return <ListMaybePlaceholder isLoading={true} /> } @@ -112,9 +117,6 @@ function LandingScreenLoaded({ const listItemsCount = starterPack.list?.listItemCount ?? 0 const onContinue = () => { - setActiveStarterPack({ - uri: starterPack.uri, - }) setScreenState(LoggedOutScreenState.S_CreateAccount) } @@ -166,6 +168,31 @@ function LandingScreenLoaded({ paddingTop: 100, }, ]}> + <Pressable + style={[ + a.absolute, + a.rounded_full, + a.align_center, + a.justify_center, + { + top: 10, + left: 10, + height: 35, + width: 35, + backgroundColor: 'rgba(0, 0, 0, 0.5)', + }, + ]} + onPress={() => { + setActiveStarterPack(undefined) + }} + accessibilityLabel={_(msg`Back`)} + accessibilityHint={_(msg`Go back to previous screen`)}> + <ChevronLeft_Stroke2_Corner0_Rounded + width={20} + height={20} + fill="white" + /> + </Pressable> <View style={[a.flex_row, a.gap_md, a.pb_sm]}> <Logo width={76} fill="white" /> </View> |