-
Notifications
You must be signed in to change notification settings - Fork 2
/
App.js
195 lines (191 loc) · 6.26 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
import { useFonts } from "expo-font";
import * as SplashScreen from "expo-splash-screen";
import { useCallback } from "react";
import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import BottomTabNavigation from "./navigation/BottomTabNavigation";
import RCBottomNavBar from "./navigation/RCBottomNavBar";
import { Cart, Profile, RecycleRequest, RecycleRequests, RecycleCenterHome, RecyclersMap, MapTest, CollectionRequests, CollectionRoutes, RecycleCenterProfile } from "./screens";
import Test from "./screens/Test";
import Recycle from "./screens/recycle/Recycle";
import ViewRecycleRequest from "./components/recycle/ViewRecycleRequest"
import Reuse from "./screens/GiveAway";
import Repair from "./screens/Repair";
import ViewProduct from "./screens/ViewProduct";
import { db } from "./firebase.config";
import SelectRepairCenter from "./screens/SelectRepairCenter";
import ConfirmRequestRepairCenter from "./screens/ConfirmRequestRepairCenter";
import RepairCenterRequest from "./screens/RepairCenterRequest";
import StartScreen from "./screens/StartScreen";
import LoginScreen from "./screens/LoginScreen";
import RegisterScreen from "./screens/RegisterScreen";
import RecycleCompanies from "./screens/recycle/RecycleCompanies";
import ViewRecycleCompany from "./components/recycle/ViewRecycleCompany";
import DropOff from "./screens/recycle/DropOff";
import ViewMyProduct from "./screens/ViewMyProduct";
import { LogBox } from 'react-native';
import PickUp from "./screens/recycle/PickUp";
const Stack = createNativeStackNavigator();
export default function App() {
const [fontsLoaded] = useFonts({
regular: require("./assets/fonts/Poppins-Regular.ttf"),
light: require("./assets/fonts/Poppins-Light.ttf"),
bold: require("./assets/fonts/Poppins-Bold.ttf"),
medium: require("./assets/fonts/Poppins-Medium.ttf"),
extrabold: require("./assets/fonts/Poppins-ExtraBold.ttf"),
semibold: require("./assets/fonts/Poppins-SemiBold.ttf"),
});
LogBox.ignoreLogs(['@firebase/auth']);
const onLayoutRootView = useCallback(async () => {
if (fontsLoaded) await SplashScreen.hideAsync();
}, [fontsLoaded]);
if (!fontsLoaded) {
return null;
}
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="Start"
component={StartScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Login"
component={LoginScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Register"
component={RegisterScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Bottom Navigation"
component={BottomTabNavigation}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Cart"
component={Cart}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Test"
component={Test}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Recycle"
component={Recycle}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Reuse"
component={Reuse}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Repair"
component={Repair}
options={{ headerShown: false }}
/>
<Stack.Screen
name="SelectRepairCenter"
component={SelectRepairCenter}
options={{ headerShown: false }}
/>
<Stack.Screen
name="ConfirmRequestRepairCenter"
component={ConfirmRequestRepairCenter}
options={{ headerShown: false }}
/>
<Stack.Screen
name="RepairCenterRequest"
component={RepairCenterRequest}
options={{ headerShown: false }}
/>
<Stack.Screen
name="ViewProduct"
component={ViewProduct}
options={{ headerShown: false }}
/>
<Stack.Screen
name="ViewMyProduct"
component={ViewMyProduct}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Profile"
component={Profile}
options={{ headerShown: false }}
/>
<Stack.Screen
name="RecycleRequests"
component={RecycleRequests}
options={{ headerShown: false }}
/>
<Stack.Screen
name="ViewRecycleRequest"
component={ViewRecycleRequest}
options={{ headerShown: false }}
/>
<Stack.Screen
name="RecycleCenterBottomNavBar"
component={RCBottomNavBar}
options={{headerShown: false}}
/>
<Stack.Screen
name="RecycleCenterHome"
component={RecycleCenterHome}
options={{headerShown: true}}
/>
<Stack.Screen
name="RecyclersMap"
component={RecyclersMap}
options={{headerShown: true}}
/>
<Stack.Screen
name="MapTest"
component={MapTest}
options={{headerShown: true}}
/>
<Stack.Screen
name="RecycleCollectionRequests"
component={CollectionRequests}
options={{headerShown: true}}
/>
<Stack.Screen
name="RecycleCollectionRoutes"
component={CollectionRoutes}
options={{headerShown: true}}
/>
<Stack.Screen
name="RecycleCenterProfile"
component={RecycleCenterProfile}
options={{headerShown: true}}
/>
<Stack.Screen
name="RecycleCompanies"
component={RecycleCompanies}
options={{ headerShown: false }}
/>
<Stack.Screen
name="ViewRecycleCompany"
component={ViewRecycleCompany}
options={{ headerShown: false }}
/>
<Stack.Screen
name="DropOff"
component={DropOff}
options={{ headerShown: false }}
/>
<Stack.Screen
name="PickUp"
component={PickUp}
options={{ headerShown: false }}
/>
</Stack.Navigator>
</NavigationContainer>
);
}