-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
83 lines (69 loc) · 2.57 KB
/
Copy pathApp.js
File metadata and controls
83 lines (69 loc) · 2.57 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
// App.js
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import FontIcon from 'react-native-vector-icons/FontAwesome';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
// Importa tus componentes de pantalla aquí
import HomeScreen from './screens/HomeScreen';
import DetailsScreen from './screens/DetailsScreen';
import ScanScreen from './screens/ScanScreen';
import DashboardScreen from './screens/DashboardScreen';
import InfoFoodScreen from './screens/InfoFoodScreen';
import InicioSesion from './screens/InicioSesion';
const Tab = createBottomTabNavigator();
const Stack = createStackNavigator();
function MyStack() {
return (
<Stack.Navigator>
<Stack.Screen name="DetailsScreenMain" component={DetailsScreen} options={ {headerShown: false} } />
<Stack.Screen name="InfoFoodScreen" component={InfoFoodScreen} />
</Stack.Navigator>
);
}
function App() {
return (
<NavigationContainer>
{/* <MyStack /> */}
<Tab.Navigator initialRouteName='HomeScreen'>
<Tab.Screen name="HomeScreen" component={HomeScreen}
options={{
tabBarIcon: ({ color, size }) => (
<FontIcon name="home" size={30} color="#000" />
),
}}
/>
<Tab.Screen name="DetailsScreen" component={MyStack}
options={{
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons name="baguette" color="#000" size={30}/>
),
}}
/>
<Tab.Screen name="ScanScreen" component={ScanScreen}
options={{
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons name="line-scan" color="#000" size={30}/>
),
}}
/>
<Tab.Screen name="DashboardScreen" component={DashboardScreen}
options={{
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons name="chart-bar" color="#000" size={30}/>
),
}}
/>
<Tab.Screen name="InicioSesion" component={InicioSesion}
options={{
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons name="account" color="#000" size={30}/>
),
}}
/>
</Tab.Navigator>
</NavigationContainer>
);
}
export default App;