forked from CleverProgrammers/LIVE-uber-eats-clone-youtube
-
Notifications
You must be signed in to change notification settings - Fork 0
/
navigation.js
30 lines (26 loc) · 1 KB
/
navigation.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
import React from "react";
import { createStackNavigator } from "@react-navigation/stack";
import { NavigationContainer } from "@react-navigation/native";
import Home from "./screens/Home";
import RestaurantDetail from "./screens/RestaurantDetail";
import { Provider as ReduxProvider } from "react-redux";
import configureStore from "./redux/store";
import OrderCompleted from "./screens/OrderCompleted";
const store = configureStore();
export default function RootNavigation() {
const Stack = createStackNavigator();
const screenOptions = {
headerShown: false,
};
return (
<ReduxProvider store={store}>
<NavigationContainer>
<Stack.Navigator initialRouteName="Home" screenOptions={screenOptions}>
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="RestaurantDetail" component={RestaurantDetail} />
<Stack.Screen name="OrderCompleted" component={OrderCompleted} />
</Stack.Navigator>
</NavigationContainer>
</ReduxProvider>
);
}