From d11b552710dc08b7cb12d5fe590b44dd30745c52 Mon Sep 17 00:00:00 2001 From: Hailey Date: Tue, 25 Jun 2024 09:36:54 -0700 Subject: [PATCH] ensure we get navigated away to starter pack when signed in (#4640) * ensure we get navigated away to starter pack when signed in * clean --- src/view/screens/Home.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/view/screens/Home.tsx b/src/view/screens/Home.tsx index dfadf9bb..98694219 100644 --- a/src/view/screens/Home.tsx +++ b/src/view/screens/Home.tsx @@ -33,8 +33,25 @@ import {HomeHeader} from '../com/home/HomeHeader' type Props = NativeStackScreenProps export function HomeScreen(props: Props) { const {data: preferences} = usePreferencesQuery() + const {currentAccount} = useSession() const {data: pinnedFeedInfos, isLoading: isPinnedFeedsLoading} = usePinnedFeedsInfos() + + React.useEffect(() => { + const params = props.route.params + if ( + currentAccount && + props.route.name === 'Start' && + params?.name && + params?.rkey + ) { + props.navigation.navigate('StarterPack', { + rkey: params.rkey, + name: params.name, + }) + } + }, [currentAccount, props.navigation, props.route.name, props.route.params]) + if (preferences && pinnedFeedInfos && !isPinnedFeedsLoading) { return (