-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.tsx
48 lines (42 loc) · 1.15 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
import React, { useContext } from "react";
import { LogBox } from "react-native";
import Routes from "./src/routes";
import AppLoading from "expo-app-loading";
import AuthContext, { AuthProvider } from "./src/contexts/Auth";
import { StackProvider } from "./src/contexts/Stack";
import {
useFonts,
Archivo_700Bold,
Archivo_500Medium,
} from "@expo-google-fonts/archivo";
import {
Poppins_400Regular,
Poppins_600SemiBold,
} from "@expo-google-fonts/poppins";
import { Roboto_400Regular } from "@expo-google-fonts/roboto";
import { NavigationContainer } from "@react-navigation/native";
export default function App() {
const [fontsLoaded] = useFonts({
Archivo_700Bold,
Archivo_500Medium,
Poppins_400Regular,
Roboto_400Regular,
Poppins_600SemiBold,
});
// Remove a Yellow Box do App
LogBox.ignoreAllLogs(true);
const { loading } = useContext(AuthContext);
if (!fontsLoaded || loading) {
return <AppLoading />;
} else {
return (
<NavigationContainer>
<AuthProvider>
<StackProvider>
<Routes />
</StackProvider>
</AuthProvider>
</NavigationContainer>
);
}
}