-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
68 lines (60 loc) · 1.8 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
import React from 'react';
import FoodList from './Screens/foodList.js';
import ShoppingList from './Screens/shoppingList';
import FoodDetails from './Screens/foodDetails';
import AddFood from './Screens/addFood.js';
import { NavigationContainer} from '@react-navigation/native';
import { createDrawerNavigator } from '@react-navigation/drawer';
import { createStackNavigator } from '@react-navigation/stack';
import { createMaterialBottomTabNavigator } from '@react-navigation/material-bottom-tabs';
const Drawer = createDrawerNavigator();
const Stack = createStackNavigator();
const MaterialBottomTabs = createMaterialBottomTabNavigator();
export default function App() {
const createHomeStack = () => {
return (
<Stack.Navigator>
<Stack.Screen
name="Foods List"
component={ FoodList }
options={{
title:"Food List",
headerShown:false
}}
/>
<Stack.Screen
name="Food Details"
component={ FoodDetails }
options={{
title:"Food Details",
headerShown:false
}}
/>
<Stack.Screen
name="Add Food"
component={ AddFood }
options={{
title:"Add New Food",
headerShown:false
}}
/>
<Stack.Screen
name="Shopping List"
component={ ShoppingList }
options={{
title:"Shopping List",
headerShown:false
}}
/>
</Stack.Navigator>
)
}
return (
<NavigationContainer>
<Drawer.Navigator>
<Drawer.Screen name="Foods List" children={ createHomeStack }/>
<Drawer.Screen name="Shopping List" component={ ShoppingList }/>
</Drawer.Navigator>
</NavigationContainer>
);
}