-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.tsx
99 lines (86 loc) · 3.47 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
import { StatusBar } from "expo-status-bar";
import React, { useEffect } from "react";
import * as NavigationBar from "expo-navigation-bar";
import Starter from "./screens/Starter";
import {
useFonts,
Montserrat_400Regular,
Montserrat_700Bold,
Montserrat_500Medium,
Montserrat_600SemiBold,
} from "@expo-google-fonts/montserrat";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { NavigationContainer } from "@react-navigation/native";
import Home from "./screens/Home";
import Activities from "./screens/Activities";
import CreateActivity from "./screens/CreateActivity";
import Absences from "./screens/Absences";
import AbsenceList from "./screens/AbsenceList";
import Grade from "./screens/Grade";
import GradeList from "./screens/GradeList";
import Groups from "./screens/Groups";
import Group from "./screens/Group";
import Week from "./screens/Week";
import Verification from "./screens/Verification";
import Toast from "react-native-toast-message";
import { UserProvider } from "./contexts/UserContext";
import Settings from "./screens/Settings";
import Contact from "./screens/Contact";
import ActivitiesDate from "./screens/ActivitiesDate";
import Login from "./screens/Login";
import CalendarScreen from "./screens/CalendarScreen";
import Welcome from "./screens/Welcome";
import { PaperProvider, MD3DarkTheme as PaperDarkMode } from "react-native-paper";
const Stack = createNativeStackNavigator();
export default function App() {
useEffect(() => {
setNavigationBarTransparent();
}, []);
const setNavigationBarTransparent = () => {
NavigationBar.setPositionAsync("absolute");
NavigationBar.setBackgroundColorAsync("transparent");
};
let [fontsLoaded] = useFonts({
Montserrat_400Regular,
Montserrat_500Medium,
Montserrat_600SemiBold,
Montserrat_700Bold,
});
if (!fontsLoaded) {
return null;
}
return (
<>
<StatusBar style="light" />
<PaperProvider theme={PaperDarkMode}>
<UserProvider>
<NavigationContainer>
<Stack.Navigator
screenOptions={{ headerShown: false, animation: "none" }}
>
<Stack.Screen name="Verification" component={Verification} />
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="Week" component={Week} />
<Stack.Screen name="Calendar" children={CalendarScreen} />
<Stack.Screen name="Starter" component={Starter} />
<Stack.Screen name="Login" component={Login} />
<Stack.Screen name="Welcome" component={Welcome} />
<Stack.Screen name="Activities" component={Activities} />
<Stack.Screen name="ActivitiesDate" component={ActivitiesDate} />
<Stack.Screen name="CreateActivity" component={CreateActivity} />
<Stack.Screen name="Absences" component={Absences} />
<Stack.Screen name="AbsenceList" component={AbsenceList} />
<Stack.Screen name="Grade" component={Grade} />
<Stack.Screen name="GradeList" component={GradeList} />
<Stack.Screen name="Groups" component={Groups} />
<Stack.Screen name="Group" component={Group} />
<Stack.Screen name="Settings" component={Settings} />
<Stack.Screen name="Contact" component={Contact} />
</Stack.Navigator>
</NavigationContainer>
<Toast />
</UserProvider>
</PaperProvider>
</>
);
}