Fix routes for logged out users

This commit is contained in:
2024-01-06 12:19:24 +01:00
committed by Clément Le Bihan
parent 038918c212
commit a3f4703dae
2 changed files with 7 additions and 9 deletions

View File

@@ -42,9 +42,7 @@ const Tab = createBottomTabNavigator<AppRouteParams & { Loading: never; Oops: ne
const Tabs = () => {
return (
<Tab.Navigator
tabBar={ScaffoldMobileCC}
>
<Tab.Navigator tabBar={ScaffoldMobileCC}>
{Object.entries(tabRoutes).map(([name, route], routeIndex) => (
<Tab.Screen
key={'route-' + routeIndex}
@@ -292,11 +290,10 @@ export const Router = () => {
return <LoadingView />;
}
const routes = authStatus == 'authed' ? { ...protectedRoutes } : publicRoutes;
return (
<NavigationContainer
linking={routesToLinkingConfig(
authStatus == 'authed' ? { ...protectedRoutes } : publicRoutes
)}
linking={routesToLinkingConfig(routes)}
fallback={<LoadingView />}
theme={colorScheme == 'light' ? DefaultTheme : DarkTheme}
>
@@ -312,7 +309,7 @@ export const Router = () => {
{routesToScreens(publicRoutes)}
</>
) : (
routesToScreens(protectedRoutes)
routesToScreens(routes)
)}
</Stack.Navigator>
</NavigationContainer>

View File

@@ -5,8 +5,9 @@ pkgs.mkShell {
nodePackages.prisma
nodePackages."@nestjs/cli"
nodePackages.npm
nodePackages.eas-cli
eslint_d
nodejs_16
nodejs_18
yarn
(python3.withPackages (ps: with ps; [requests mido]))
pkg-config