Fix routes for logged out users
This commit is contained in:
@@ -35,16 +35,14 @@ import DiscoveryView from './views/V2/DiscoveryView';
|
||||
import MusicView from './views/MusicView';
|
||||
import Leaderboardiew from './views/LeaderboardView';
|
||||
import { LinearGradient } from 'expo-linear-gradient';
|
||||
import ScaffoldMobileCC from './components/UI/ScaffoldMobileCC';
|
||||
import ScaffoldMobileCC from './components/UI/ScaffoldMobileCC';
|
||||
|
||||
const Stack = createNativeStackNavigator<AppRouteParams & { Loading: never; Oops: never }>();
|
||||
const Tab = createBottomTabNavigator<AppRouteParams & { Loading: never; Oops: never }>();
|
||||
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user