forked from e-spres-oh/fit-panda-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
107 lines (103 loc) · 3.5 KB
/
App.tsx
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
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import React from 'react';
import { DefaultTheme, MD3Theme, Provider as PaperProvider } from 'react-native-paper';
import { Routes } from './src/routes/routes';
import { RouteParams } from './src/routes/types';
import LoginScreen from './src/screens/LoginScreen';
import SignUpScreen from './src/screens/SignUpScreen';
import UserInfoScreen from './src/screens/UserInfoScreen';
import WelcomeScreen from './src/screens/WelcomeScreen';
import UserActivityLevelScreen from './src/screens/UserActivityLevelScreen';
import UserGoalScreen from './src/screens/UserGoal';
import SignUpCongratsScreen from './src/screens/SignUpCongrats';
import HomeScreen from './src/screens/HomeScreen';
import AddFoodScreen from './src/screens/AddFoodScreen';
import { UserStoreProvider } from './src/contexts/UserContext';
import { FoodStoreProvider } from './src/contexts/FoodContext';
import AddFoodBarcodeScreen from './src/screens/AddFoodBarcodeScreen';
const colors = {
primary: '#5589f8',
background: '#edf1f5',
};
const theme: MD3Theme = {
...DefaultTheme,
colors: {
...DefaultTheme.colors,
...colors,
surfaceVariant: '#fff',
secondaryContainer: '#fff',
},
roundness: 1,
};
const Stack = createStackNavigator<RouteParams>();
export default function App() {
return (
<PaperProvider theme={theme}>
<UserStoreProvider>
<FoodStoreProvider>
<NavigationContainer>
<Stack.Navigator initialRouteName={Routes.Welcome}>
<Stack.Screen
name={Routes.Welcome}
component={WelcomeScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name={Routes.Login}
component={LoginScreen}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name={Routes.SignUp}
component={SignUpScreen}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name={Routes.UserInfo}
component={UserInfoScreen}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name={Routes.UserActivityLevel}
component={UserActivityLevelScreen}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name={Routes.UserGoal}
component={UserGoalScreen}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name={Routes.SignUpCongrats}
component={SignUpCongratsScreen}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name={Routes.Home}
component={HomeScreen}
options={{
headerShown: false,
}}
/>
<Stack.Screen name={Routes.AddFood} component={AddFoodScreen} />
<Stack.Screen name={Routes.AddFoodBarcode} component={AddFoodBarcodeScreen} />
</Stack.Navigator>
</NavigationContainer>
</FoodStoreProvider>
</UserStoreProvider>
</PaperProvider>
);
}