-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
32 lines (28 loc) · 802 Bytes
/
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
import "react-native-gesture-handler";
import { Baloo2_700Bold } from "@expo-google-fonts/baloo-2";
import { Roboto_400Regular, Roboto_700Bold } from "@expo-google-fonts/roboto";
import { useFonts } from "expo-font";
import * as SplashScreen from "expo-splash-screen";
import { useEffect } from "react";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import Routes from "./src/routes";
export default function App() {
const [loaded, error] = useFonts({
Baloo2_700Bold,
Roboto_700Bold,
Roboto_400Regular,
});
useEffect(() => {
if (loaded || error) {
SplashScreen.hideAsync();
}
}, [loaded, error]);
if (!loaded && !error) {
return null;
}
return (
<GestureHandlerRootView>
<Routes />
</GestureHandlerRootView>
);
}