-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnavigation.js
30 lines (26 loc) · 1.12 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 screenOption = {
headerShown: false
};
return (
<ReduxProvider store={store}>
<NavigationContainer>
<Stack.Navigator initialRouteName='Home' screenOptions={screenOption}>
<Stack.Screen name='Home' component={Home}></Stack.Screen>
<Stack.Screen name='RestaurantDetail' component={RestaurantDetail}></Stack.Screen>
<Stack.Screen name='OrderCompleted' component={OrderCompleted}></Stack.Screen>
</Stack.Navigator>
</NavigationContainer>
</ReduxProvider>
)
}