-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
93 lines (86 loc) · 2.54 KB
/
App.js
File metadata and controls
93 lines (86 loc) · 2.54 KB
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
86
87
88
89
90
91
92
93
import 'react-native-gesture-handler';
import React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
//importar views
import DetallePlatillo from './views/DetallePlatillo';
import FormularioPlatillo from './views/FormularioPlatillo';
import Menu from './views/Menu';
import NuevaOrden from './views/NuevaOrden';
import ProgresoPedido from './views/ProgresoPedido';
import ResumenPedido from './views/ResumenPedido';
//Componentes
import BotonResumen from './components/UI/BotonResumen';
//Importar state de context
import FirebaseState from './context/firebase/firebaseState';
import PedidoState from './context/pedidos/pedidosState';
const Stack = createStackNavigator();
const App = () => {
return (
<>
<FirebaseState>
<PedidoState>
<NavigationContainer>
<Stack.Navigator
screenOptions={{
headerTitleAlign: 'center',
headerStyle: {
backgroundColor: '#FFDA00'
},
headerTitleStyle: {
fontWeight: 'bold',
},
headerTintColor: '#000',
}}
>
<Stack.Screen
name="NuevaOrden"
component={NuevaOrden}
options={{
title: "Nueva Orden"
}}
/>
<Stack.Screen
name="Menu"
component={Menu}
options={{
title: "Menú",
headerRight: props => <BotonResumen />
}}
/>
<Stack.Screen
name="DetallePlatillo"
component={DetallePlatillo}
options={{
title: "Detalle platillo"
}}
/>
<Stack.Screen
name="FormularioPlatillo"
component={FormularioPlatillo}
options={{
title: "Ordenar platillo"
}}
/>
<Stack.Screen
name="ResumenPedido"
component={ResumenPedido}
options={{
title: "Resúmen del pedido"
}}
/>
<Stack.Screen
name="ProgresoPedido"
component={ProgresoPedido}
options={{
title: "Progeso del pedido"
}}
/>
</Stack.Navigator>
</NavigationContainer>
</PedidoState>
</FirebaseState>
</>
)
};
export default App;