-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
35 lines (29 loc) · 922 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
import "expo-dev-client";
import { Eczar_400Regular as Eczar400Regular } from "@expo-google-fonts/eczar";
import { Provider as ReduxProvider } from "react-redux";
import * as SplashScreen from "expo-splash-screen";
import { reduxStore } from "./src/redux/store";
import { useFonts } from "expo-font";
import { useCallback } from "react";
import { Main } from "./src/Main";
import "./src/locales/i18n";
SplashScreen.preventAutoHideAsync();
export default function App() {
const [fontsLoaded] = useFonts({
RedHatMono: require("./assets/fonts/RedHatMono-VariableFont_wght.ttf"),
Eczar400Regular,
});
const handleReadyLayout = useCallback(async () => {
if (fontsLoaded) {
await SplashScreen.hideAsync();
}
}, [fontsLoaded]);
if (!fontsLoaded) {
return null;
}
return (
<ReduxProvider store={reduxStore}>
<Main onLayout={handleReadyLayout} />
</ReduxProvider>
);
}