-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
37 lines (32 loc) · 1017 Bytes
/
App.js
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
import { NavigationContainer } from "@react-navigation/native";
import "intl";
import "intl/locale-data/jsonp/en";
import { useCallback } from "react";
import { LogBox } from "react-native";
import "react-native-gesture-handler";
import Root from "./navigator/Base";
// import Log from "./pages/Log/Log";
import { useFonts } from "expo-font";
import * as SplashScreen from "expo-splash-screen";
SplashScreen.preventAutoHideAsync();
LogBox.ignoreAllLogs();
export default () => {
const [fontsLoaded] = useFonts({
"Roboto-Black": require("./assets/fonts/Roboto-Black.ttf"),
"Roboto-Bold": require("./assets/fonts/Roboto-Bold.ttf"),
"Roboto-Regular": require("./assets/fonts/Roboto-Regular.ttf"),
});
const onLayoutRootView = useCallback(async () => {
if (fontsLoaded) {
await SplashScreen.hideAsync();
}
}, [fontsLoaded]);
if (!fontsLoaded) {
return null;
}
return (
<NavigationContainer onReady={onLayoutRootView}>
<Root />
</NavigationContainer>
);
};