-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
100 lines (95 loc) · 4.04 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
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
94
95
96
97
98
99
100
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { Ionicons } from '@expo/vector-icons';
import LoginScreen from './screens/LoginScreen';
import HomeScreen from './screens/HomeScreen';
import InformationHubScreen from './screens/InformationHubScreen';
import WelcomeScreen from './screens/WelcomeScreen';
import RegisterScreen from './screens/RegisterScreen';
import ResetPasswordScreen from './screens/ResetPasswordScreen';
import CameraComponent from './components/CameraComponent';
import ContactUsScreen from './screens/ContactUsScreen';
import Results from './screens/Results';
const Stack = createNativeStackNavigator();
const Tab = createBottomTabNavigator();
const BottomTabNavigator = () => {
return (
<Tab.Navigator
screenOptions={{
tabBarActiveTintColor: '#2F4F4F',
tabBarInactiveTintColor: '#2F4F4F',
tabBarLabelStyle: { fontSize: 12 },
}}
>
<Tab.Screen
name="HOME"
component={HomeScreen}
options={{
tabBarLabel: 'Home',
headerTitle: 'Home',
headerTitleAlign: 'center',
tabBarIcon: ({ color, size, focused }) => (
<Ionicons
name={focused ? 'home' : 'home-outline'}
size={size}
color={color}
/>
),
headerStyle: {
backgroundColor: 'white',
}
}}
/>
<Tab.Screen
name="Information Hub"
component={InformationHubScreen}
options={{
tabBarLabel: 'Information Hub',
headerTitleAlign: 'center',
tabBarIcon: ({ color, size, focused }) => (
<Ionicons
name={focused ? 'information-circle' : 'information-circle-outline'}
size={size}
color={color}
/>
),
}}
/>
<Tab.Screen
name="About Us"
component={ContactUsScreen}
options={{
tabBarLabel: 'About Us',
headerTitleAlign: 'center',
tabBarIcon: ({ color, size, focused }) => (
<Ionicons
name={focused ? 'call' : 'call-outline'}
size={size}
color={color}
/>
),
}}
/>
</Tab.Navigator>
);
}
const App = () => {
return (
<NavigationContainer>
<Stack.Navigator >
<Stack.Screen name="Welcome" component={WelcomeScreen} options={{ headerShown: false }} />
<Stack.Screen name="Register" component={RegisterScreen} />
<Stack.Screen name="Login" component={LoginScreen} />
<Stack.Screen name='Reset Password' component={ResetPasswordScreen} />
<Stack.Screen name="Home" component={BottomTabNavigator} options={{ headerShown: false }} />
<Stack.Screen name="Information Hub" component={BottomTabNavigator} options={{ headerShown: false }}/>
<Stack.Screen name="About Us" component={BottomTabNavigator} options={{ headerShown: false }}/>
<Stack.Screen name="Camera" component={CameraComponent} options={{ headerShown: false }} />
<Stack.Screen name="Results" component={Results} options={{ headerTitleAlign: 'center', headerBackVisible: false}}/>
</Stack.Navigator>
</NavigationContainer>
);
};
export default App;