|
@@ -94,6 +94,7 @@ import { Splash } from 'src/components/SplashSpinner';
|
|
import { useMessagesStore } from 'src/stores/unreadMessagesStore';
|
|
import { useMessagesStore } from 'src/stores/unreadMessagesStore';
|
|
import LocationSharingScreen from 'src/screens/LocationSharingScreen';
|
|
import LocationSharingScreen from 'src/screens/LocationSharingScreen';
|
|
import { useFriendsNotificationsStore } from 'src/stores/friendsNotificationsStore';
|
|
import { useFriendsNotificationsStore } from 'src/stores/friendsNotificationsStore';
|
|
|
|
+import { NavigationProvider } from 'src/contexts/NavigationContext';
|
|
|
|
|
|
enableScreens();
|
|
enableScreens();
|
|
|
|
|
|
@@ -463,51 +464,59 @@ const Route = () => {
|
|
|
|
|
|
return (
|
|
return (
|
|
<PushNotificationProvider>
|
|
<PushNotificationProvider>
|
|
- <ScreenStack.Navigator
|
|
|
|
- screenOptions={{ headerShown: false, cardStyle: { backgroundColor: 'white' } }}
|
|
|
|
- initialRouteName={token ? NAVIGATION_PAGES.IN_APP : NAVIGATION_PAGES.WELCOME}
|
|
|
|
- >
|
|
|
|
- <ScreenStack.Screen name={NAVIGATION_PAGES.WELCOME} component={WelcomeScreen} />
|
|
|
|
- <ScreenStack.Screen name={NAVIGATION_PAGES.LOGIN} component={LoginScreen} />
|
|
|
|
- <ScreenStack.Screen name={NAVIGATION_PAGES.REGISTER} component={JoinUsScreen} />
|
|
|
|
- <ScreenStack.Screen name={NAVIGATION_PAGES.REGISTER_ACCOUNT_DATA} component={EditAccount} />
|
|
|
|
- <ScreenStack.Screen
|
|
|
|
- name={NAVIGATION_PAGES.RESET_PASSWORD}
|
|
|
|
- component={ResetPasswordScreen}
|
|
|
|
- />
|
|
|
|
- <ScreenStack.Screen
|
|
|
|
- name={NAVIGATION_PAGES.RESET_PASSWORD_DEEP}
|
|
|
|
- component={ResetPasswordDeepScreen}
|
|
|
|
- />
|
|
|
|
- <ScreenStack.Screen name={NAVIGATION_PAGES.INFO} component={InfoScreen} />
|
|
|
|
- <ScreenStack.Screen name={NAVIGATION_PAGES.JOIN_INFO} component={JoinInfoScreen} />
|
|
|
|
- <ScreenStack.Screen name={NAVIGATION_PAGES.DISCOVER_INFO} component={DiscoverInfoScreen} />
|
|
|
|
- <ScreenStack.Screen name={NAVIGATION_PAGES.PLAN_INFO} component={PlanInfoScreen} />
|
|
|
|
- <ScreenStack.Screen
|
|
|
|
- name={NAVIGATION_PAGES.FIRST_STEPS_INFO}
|
|
|
|
- component={FirstStepsInfoScreen}
|
|
|
|
- />
|
|
|
|
- <ScreenStack.Screen
|
|
|
|
- name={NAVIGATION_PAGES.COUNTRIES_INFO}
|
|
|
|
- component={CountriesInfoScreen}
|
|
|
|
- />
|
|
|
|
- <ScreenStack.Screen name={NAVIGATION_PAGES.DARE_INFO} component={DareInfoScreen} />
|
|
|
|
- <ScreenStack.Screen name={NAVIGATION_PAGES.REGIONS_INFO} component={RegionsInfoScreen} />
|
|
|
|
- <ScreenStack.Screen name={NAVIGATION_PAGES.TRIPS_INFO} component={TripsInfoScreen} />
|
|
|
|
- <ScreenStack.Screen name={NAVIGATION_PAGES.FIXERS_INFO} component={FixersInfoScreen} />
|
|
|
|
- <ScreenStack.Screen name={NAVIGATION_PAGES.EARTH_INFO} component={EarthInfoScreen} />
|
|
|
|
- <ScreenStack.Screen name={NAVIGATION_PAGES.IN_APP}>
|
|
|
|
- {() => (
|
|
|
|
- <MapDrawer.Navigator drawerContent={(props) => <MenuDrawer {...props} />}>
|
|
|
|
- <MapDrawer.Screen
|
|
|
|
- name="DrawerApp"
|
|
|
|
- component={BottomTabNavigator}
|
|
|
|
- options={{ headerShown: false }}
|
|
|
|
- />
|
|
|
|
- </MapDrawer.Navigator>
|
|
|
|
- )}
|
|
|
|
- </ScreenStack.Screen>
|
|
|
|
- </ScreenStack.Navigator>
|
|
|
|
|
|
+ <NavigationProvider>
|
|
|
|
+ <ScreenStack.Navigator
|
|
|
|
+ screenOptions={{ headerShown: false, cardStyle: { backgroundColor: 'white' } }}
|
|
|
|
+ initialRouteName={token ? NAVIGATION_PAGES.IN_APP : NAVIGATION_PAGES.WELCOME}
|
|
|
|
+ >
|
|
|
|
+ <ScreenStack.Screen name={NAVIGATION_PAGES.WELCOME} component={WelcomeScreen} />
|
|
|
|
+ <ScreenStack.Screen name={NAVIGATION_PAGES.LOGIN} component={LoginScreen} />
|
|
|
|
+ <ScreenStack.Screen name={NAVIGATION_PAGES.REGISTER} component={JoinUsScreen} />
|
|
|
|
+ <ScreenStack.Screen
|
|
|
|
+ name={NAVIGATION_PAGES.REGISTER_ACCOUNT_DATA}
|
|
|
|
+ component={EditAccount}
|
|
|
|
+ />
|
|
|
|
+ <ScreenStack.Screen
|
|
|
|
+ name={NAVIGATION_PAGES.RESET_PASSWORD}
|
|
|
|
+ component={ResetPasswordScreen}
|
|
|
|
+ />
|
|
|
|
+ <ScreenStack.Screen
|
|
|
|
+ name={NAVIGATION_PAGES.RESET_PASSWORD_DEEP}
|
|
|
|
+ component={ResetPasswordDeepScreen}
|
|
|
|
+ />
|
|
|
|
+ <ScreenStack.Screen name={NAVIGATION_PAGES.INFO} component={InfoScreen} />
|
|
|
|
+ <ScreenStack.Screen name={NAVIGATION_PAGES.JOIN_INFO} component={JoinInfoScreen} />
|
|
|
|
+ <ScreenStack.Screen
|
|
|
|
+ name={NAVIGATION_PAGES.DISCOVER_INFO}
|
|
|
|
+ component={DiscoverInfoScreen}
|
|
|
|
+ />
|
|
|
|
+ <ScreenStack.Screen name={NAVIGATION_PAGES.PLAN_INFO} component={PlanInfoScreen} />
|
|
|
|
+ <ScreenStack.Screen
|
|
|
|
+ name={NAVIGATION_PAGES.FIRST_STEPS_INFO}
|
|
|
|
+ component={FirstStepsInfoScreen}
|
|
|
|
+ />
|
|
|
|
+ <ScreenStack.Screen
|
|
|
|
+ name={NAVIGATION_PAGES.COUNTRIES_INFO}
|
|
|
|
+ component={CountriesInfoScreen}
|
|
|
|
+ />
|
|
|
|
+ <ScreenStack.Screen name={NAVIGATION_PAGES.DARE_INFO} component={DareInfoScreen} />
|
|
|
|
+ <ScreenStack.Screen name={NAVIGATION_PAGES.REGIONS_INFO} component={RegionsInfoScreen} />
|
|
|
|
+ <ScreenStack.Screen name={NAVIGATION_PAGES.TRIPS_INFO} component={TripsInfoScreen} />
|
|
|
|
+ <ScreenStack.Screen name={NAVIGATION_PAGES.FIXERS_INFO} component={FixersInfoScreen} />
|
|
|
|
+ <ScreenStack.Screen name={NAVIGATION_PAGES.EARTH_INFO} component={EarthInfoScreen} />
|
|
|
|
+ <ScreenStack.Screen name={NAVIGATION_PAGES.IN_APP}>
|
|
|
|
+ {() => (
|
|
|
|
+ <MapDrawer.Navigator drawerContent={(props) => <MenuDrawer {...props} />}>
|
|
|
|
+ <MapDrawer.Screen
|
|
|
|
+ name="DrawerApp"
|
|
|
|
+ component={BottomTabNavigator}
|
|
|
|
+ options={{ headerShown: false }}
|
|
|
|
+ />
|
|
|
|
+ </MapDrawer.Navigator>
|
|
|
|
+ )}
|
|
|
|
+ </ScreenStack.Screen>
|
|
|
|
+ </ScreenStack.Navigator>
|
|
|
|
+ </NavigationProvider>
|
|
</PushNotificationProvider>
|
|
</PushNotificationProvider>
|
|
);
|
|
);
|
|
};
|
|
};
|