-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
41 lines (39 loc) · 1.75 KB
/
App.tsx
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
import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import "react-native-gesture-handler";
import { StatusBar } from "expo-status-bar";
import Landing from "./src/screens/Landing/landing";
import { RequesterTabs } from "./src/screens/Requester/requestertabs";
import { DriverTabs } from "./src/screens/Driver/drivertabs";
import { GateGuardTabs } from "./src/screens/GateGuard/gateguardtabs";
import LoadingScreen from "./src/components/loadingscreen/loadingscreen";
import { Props } from "./src/components/loadingscreen/loadingscreen";
import { Provider } from "react-redux";
import { PersistGate } from "redux-persist/integration/react";
import { store, persistor } from "./src/redux/store";
import Profile from "./src/screens/Profile/profile";
const Stack = createNativeStackNavigator();
export default function App() {
return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<NavigationContainer>
<StatusBar style="light" />
<Stack.Navigator
initialRouteName="Landing"
screenOptions={{ headerShown: false }}
>
<Stack.Screen name="Landing" component={Landing} />
<Stack.Screen name="Profile" component={Profile} />
<Stack.Screen name="Requester" component={RequesterTabs} />
<Stack.Screen name="Driver" component={DriverTabs} />
<Stack.Screen name="GateGuard" component={GateGuardTabs} />
<Stack.Screen name="LoadingScreen">
{(props) => <LoadingScreen {...(props as Props)} />}
</Stack.Screen>
</Stack.Navigator>
</NavigationContainer>
</PersistGate>
</Provider>
);
}