-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
229 lines (221 loc) · 5.58 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
import React from "react";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { createStackNavigator } from "@react-navigation/stack";
import {
Home,
Analytics,
Predictions,
ProfileScreen,
EditProfileScreen,
MyAccountScreen,
AboutPage,
HelpAndSupportPage,
TwoFactorAuthPage,
BiometricAuthPage,
EmergencyContactsPage,
AlarmsPage,
LandingPage,
} from "./components";
import { SafeAreaView, StyleSheet, Text } from "react-native";
import { NavigationContainer } from "@react-navigation/native";
import { StatusBar } from "expo-status-bar";
import { Ionicons } from "@expo/vector-icons";
import LogIn from "./components/Landing/LogIn";
import SignUp from "./components/Landing/SignUp";
const Tab = createBottomTabNavigator();
const Stack = createStackNavigator();
const HomeStack = () => {
return (
<Stack.Navigator>
<Stack.Screen
name="Welcome, User"
component={Home}
options={{
title: "Home",
headerShown: false,
tabBarIcon: ({ color, size }) => (
<Ionicons name="ios-home" color={"green"} size={size} />
),
}}
/>
<Stack.Screen
name="Analytics"
component={Analytics}
options={{
title: "Analytics",
headerShown: false,
tabBarIcon: ({ color, size }) => (
<Ionicons name="stats-chart-outline" color={"green"} size={size} />
),
}}
/>
</Stack.Navigator>
);
};
const ProfileStack = () => {
return (
<Stack.Navigator>
<Stack.Screen
name="Profile Page"
component={ProfileScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Edit Profile"
component={EditProfileScreen}
options={{ title: "Edit Profile" }}
/>
<Stack.Screen
name="Account Screen"
component={MyAccountScreen}
options={{ title: "My Account" }}
/>
<Stack.Screen
name="About Screen"
component={AboutPage}
options={{ title: "About Us" }}
/>
<Stack.Screen
name="Help Screen"
component={HelpAndSupportPage}
options={{ title: "Help and Support" }}
/>
<Stack.Screen
name="Two Factor Authentication"
component={TwoFactorAuthPage}
options={{ title: "Two Factor Authentication" }}
/>
<Stack.Screen
name="Biometric Authentication"
component={BiometricAuthPage}
options={{ title: "Biometric Authentication" }}
/>
<Stack.Screen
name="Emergency Contacts"
component={EmergencyContactsPage}
options={{ title: "Emergency Contacts" }}
/>
<Stack.Screen
name="My Alarms"
component={AlarmsPage}
options={{ title: "My Alarms" }}
/>
</Stack.Navigator>
);
};
const LandingStack = () => {
return (
<Stack.Navigator>
<Stack.Screen
name="Landing"
component={LandingPage}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="LogIn"
component={LogIn}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="SignUp"
component={SignUp}
options={{
headerShown: false,
}}
/>
</Stack.Navigator>
);
};
const App = () => {
return (
<SafeAreaView style={globalStyles.container}>
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="Landing"
component={LandingStack}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="Main"
component={MainTabs}
options={{
headerShown: false,
}}
/>
</Stack.Navigator>
</NavigationContainer>
</SafeAreaView>
);
};
const MainTabs = () => {
return (
<Tab.Navigator>
<Tab.Screen
name="Welcome, User"
component={HomeStack}
options={{
title: "Home",
headerShown: false,
tabBarIcon: ({ color, size }) => (
<Ionicons name="ios-home" color={"green"} size={size} />
),
}}
/>
<Tab.Screen
name="Analytics"
component={Analytics}
options={{
title: "Analytics",
headerShown: false,
tabBarIcon: ({ color, size }) => (
<Ionicons
name="stats-chart-outline"
color={"green"}
size={size}
/>
),
}}
/>
<Tab.Screen
name="Predict"
component={Predictions}
options={{
title: "Prediction",
headerShown: false,
tabBarIcon: ({ color, size }) => (
<Ionicons
name="analytics-outline"
color={"green"}
size={size}
/>
),
}}
/>
<Tab.Screen
name="Profile"
component={ProfileStack}
options={{
headerShown: false,
tabBarIcon: ({ color, size }) => (
<Ionicons name="person-outline" color={"green"} size={size} />
),
}}
/>
</Tab.Navigator>
);
};
export const globalStyles = StyleSheet.create({
container: {
flex: 1,
flexDirection: "column",
width: "100%",
},
});
export default App;