-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.tsx
40 lines (37 loc) · 1.03 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 * as SplashScreen from "expo-splash-screen";
import { ThemeProvider } from "styled-components";
import { Inter_400Regular, Inter_500Medium } from "@expo-google-fonts/inter";
import {
Archivo_400Regular,
Archivo_500Medium,
Archivo_600SemiBold,
useFonts,
} from "@expo-google-fonts/archivo";
import theme from "./src/styles/theme";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { Routes } from "./src/routes";
import { AppProvider } from "./src/hooks/useAuth";
export default function App() {
SplashScreen.preventAutoHideAsync();
const [isLoaded] = useFonts({
Inter_400Regular,
Inter_500Medium,
Archivo_400Regular,
Archivo_500Medium,
Archivo_600SemiBold,
});
if (!isLoaded) {
return null;
}
SplashScreen.hideAsync();
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<ThemeProvider theme={theme}>
<AppProvider>
<Routes />
</AppProvider>
</ThemeProvider>
</GestureHandlerRootView>
);
}