-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.jsx
173 lines (162 loc) · 7.36 KB
/
App.jsx
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
// Import necessary dependencies and components from React and React Native
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { StatusBar } from 'expo-status-bar';
// Import custom screens and components
import LoginScreen from './screens/auth/Login';
import CreateAccountScreen from './screens/auth/Signup'
import ForgotPasswordScreen from './screens/auth/ForgotPassword';
import HubNavigator from './navigation/HubNavigator';
import UpdateEmailScreen from './screens/updateAccount/UpdateEmail';
import UpdatePasswordScreen from './screens/updateAccount/UpdatePassword';
import FindHelp from './screens/hub/FindHelp';
import JournalEntry from './screens/hub/Journal';
import JournalEntryList from "./screens/hub/ListJournals";
import EditJournal from "./screens/hub/EditJournal";
import ExerciseDetails from './screens/hub/ExerciseDetails';
import MoodTracking from './screens/hub/MoodTracking';
import ShowExercises from "./screens/hub/ExerciseManagement/ShowExercises"
import AddExercise from './screens/hub/ExerciseManagement/AddExercise';
import ModifyExercise from "./screens/hub/ExerciseManagement/ModifyExercise";
import BackButton from './navigation/BackButton';
// Create a new stack navigator to navigate between screens
const Stack = createStackNavigator();
// Define the main App component
export default function App() {
// Define header background color
const headerBackgroundColor = '#FCF6EE'
// Render the main app structure with navigation
return (
<NavigationContainer>
<StatusBar style="auto" />
{/* Stack Navigator to manage screen transitions */}
<Stack.Navigator initialRouteName="Login" screenOptions={{ headerShown: false }}>
{/* Define screens and their configurations */}
<Stack.Screen name="Login" component={LoginScreen} />
<Stack.Screen name="Create Account"
component={CreateAccountScreen}
options={{
headerShown: true,
headerTransparent: true,
headerTitle: "",
headerStyle: { backgroundColor: headerBackgroundColor },
headerLeft: () => <BackButton />
}}
/>
<Stack.Screen name="Forgot Password"
component={ForgotPasswordScreen}
options={{
headerShown: true,
headerTransparent: true,
headerTitle: "",
headerStyle: { backgroundColor: headerBackgroundColor },
headerLeft: () => <BackButton />
}}
/>
<Stack.Screen name="Hub Navigator" component={HubNavigator} options={{ gestureEnabled: false }} />
<Stack.Screen name="Find Help"
component={FindHelp}
options={{
headerShown: true,
headerTransparent: true,
headerTitle: "",
headerStyle: { backgroundColor: headerBackgroundColor },
headerLeft: () => <BackButton />
}}
/>
<Stack.Screen name="Entry List" component={JournalEntryList} />
<Stack.Screen name="New Entry"
component={JournalEntry}
options={{
headerShown: true,
headerTransparent: true,
headerTitle: "",
headerStyle: { backgroundColor: headerBackgroundColor },
headerLeft: () => <BackButton />
}}
/>
<Stack.Screen name="Edit Entry"
component={EditJournal}
options={{
headerShown: true,
headerTransparent: true,
headerTitle: "",
headerStyle: { backgroundColor: headerBackgroundColor },
headerLeft: () => <BackButton />
}}
/>
<Stack.Screen name="Update Password"
component={UpdatePasswordScreen}
options={{
headerShown: true,
headerTransparent: true,
headerTitle: "",
headerStyle: { backgroundColor: headerBackgroundColor },
headerLeft: () => <BackButton />
}}
/>
<Stack.Screen name="Update Email"
component={UpdateEmailScreen}
options={{
headerShown: true,
headerTransparent: true,
headerTitle: "",
headerStyle: { backgroundColor: headerBackgroundColor },
headerLeft: () => <BackButton />
}}
/>
<Stack.Screen name="Exercise Details"
component={ExerciseDetails}
options={{
headerShown: true,
headerTransparent: true,
headerTitle: "",
headerStyle: { backgroundColor: headerBackgroundColor },
headerLeft: () => <BackButton />
}}
/>
<Stack.Screen name="Manage Exercises"
component={ShowExercises}
options={{
headerShown: true,
headerTransparent: true,
headerTitle: "",
headerStyle: { backgroundColor: headerBackgroundColor },
headerLeft: () => <BackButton />
}}
/>
<Stack.Screen name="Add Exercise"
component={AddExercise}
options={{
headerShown: true,
headerTransparent: true,
headerTitle: "",
headerStyle: { backgroundColor: headerBackgroundColor },
headerLeft: () => <BackButton />
}}
/>
<Stack.Screen name="Modify Exercise"
component={ModifyExercise}
options={{
headerShown: true,
headerTransparent: true,
headerTitle: "",
headerStyle: { backgroundColor: headerBackgroundColor },
headerLeft: () => <BackButton />
}}
/>
<Stack.Screen name="New Mood"
component={MoodTracking}
options={{
headerShown: true,
headerTransparent: true,
headerTitle: "",
headerStyle: { backgroundColor: headerBackgroundColor },
headerLeft: () => <BackButton />
}}
/>
</Stack.Navigator>
</NavigationContainer>
);
}