-
-
Save AllGistsEqual/2200b3843188c6a2e89e402d3c5f919d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// File: src/routing/MainNavigation.tsx | |
// (partial) | |
const MainNavigation = (): React.ReactElement => { | |
const isLoggedIn = useReduxSelector(selectLogin) | |
return ( | |
<NavigationContainer> | |
<MainStack.Navigator headerMode="none"> | |
{isLoggedIn ? ( | |
<> | |
<MainStack.Screen name={MainRoutes.AppLoading} component={AppLoadingScreen} /> | |
<MainStack.Screen name={MainRoutes.Home} component={HomeScreen} /> | |
<MainStack.Screen name={MainRoutes.Settings} component={SettingsScreen} /> | |
</> | |
) : ( | |
<> | |
<MainStack.Screen name={MainRoutes.Splash} component={SplashScreen} /> | |
<MainStack.Screen name={MainRoutes.AppCheck} component={AppCheckScreen} /> | |
<MainStack.Screen name={MainRoutes.SignIn} component={SignInScreen} /> | |
<MainStack.Screen name={MainRoutes.SignUp} component={SignUpScreen} /> | |
</> | |
)} | |
</MainStack.Navigator> | |
</NavigationContainer> | |
) | |
} | |
export default MainNavigation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment