-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
85 lines (83 loc) · 3.37 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { ActionSheetProvider } from "@expo/react-native-action-sheet";
import { Provider } from "react-redux";
import { store, persistor } from "./src/redux/store";
import { StatusBar } from "react-native";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import Tabs from "./src/navigation/tabs/Tabs";
import { PersistGate } from "redux-persist/integration/react";
import { FontProvider } from "./src/contexts/FontContext";
import AuthStack from "./src/navigation/AuthStack";
import GymStack from "./src/navigation/GymStack";
import SpraywallStack from "./src/navigation/SpraywallStack";
import CameraStack from "./src/navigation/CameraStack";
import BoulderStack from "./src/navigation/BoulderStack";
import ProfileStack from "./src/navigation/ProfileStack";
import CircuitStack from "./src/navigation/CircuitStack";
const Stack = createNativeStackNavigator();
export default function App() {
return (
// ReactNativeActionSheet uses React context to allow your components to invoke the menu
<GestureHandlerRootView style={{ flex: 1 }}>
<ActionSheetProvider>
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<FontProvider>
<NavigationContainer>
<StatusBar barStyle={"dark-content"} />
{/* Preload the images before rendering any screen */}
<Stack.Navigator initialRouteName="AuthStack">
{/* Screens */}
<Stack.Screen
name="AuthStack"
component={AuthStack}
options={{ headerShown: false }}
/>
<Stack.Screen
name="GymStack"
component={GymStack}
options={{ headerShown: false }}
/>
<Stack.Screen
name="SpraywallStack"
component={SpraywallStack}
options={{ headerShown: false }}
/>
<Stack.Screen
name="CameraStack"
component={CameraStack}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Tabs"
options={{
headerShown: false,
}}
>
{({ navigation }) => <Tabs navigation={navigation} />}
</Stack.Screen>
<Stack.Screen
name="BoulderStack"
component={BoulderStack}
options={{ headerShown: false }}
/>
<Stack.Screen
name="ProfileStack"
component={ProfileStack}
options={{ headerShown: false }}
/>
<Stack.Screen
name="CircuitStack"
component={CircuitStack}
options={{ headerShown: false }}
/>
</Stack.Navigator>
</NavigationContainer>
</FontProvider>
</PersistGate>
</Provider>
</ActionSheetProvider>
</GestureHandlerRootView>
);
}