forked from kurel-prog/android_task_monitoring_se_mobile
-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.tsx
40 lines (38 loc) · 1.28 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
import React from "react";
import { View } from "react-native";
import { globalStyles } from "./constants/GlobalStyle";
import { useFonts } from "expo-font";
import AppLoading from "expo-app-loading";
import MainScreen from "./screens/MainScreen";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { LinearGradient } from "expo-linear-gradient";
import { Provider as AuthProvider } from "./context/AuthContext";
import { Provider as LoadingProvider } from "./context/LoadingContext";
export default function App() {
const [loaded] = useFonts({
AllerDisplay: require("./assets/fonts/AllerDisplay.ttf"),
SansationRegular: require("./assets/fonts/Sansation-Regular.ttf"),
GloryB: require("./assets/fonts/Glory-Bold.ttf"),
GloryM: require("./assets/fonts/Glory-Medium.ttf"),
});
if (!loaded) {
return <AppLoading />;
} else {
return (
<SafeAreaProvider>
<LinearGradient
// Background Linear Gradient
colors={["#243B55", "#141E30"]}
style={globalStyles.background}
/>
<View style={globalStyles.container}>
<LoadingProvider>
<AuthProvider>
<MainScreen />
</AuthProvider>
</LoadingProvider>
</View>
</SafeAreaProvider>
);
}
}