forked from Memmy-App/memmy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
60 lines (51 loc) · 2.16 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/* eslint-disable react/jsx-filename-extension */
/* eslint-disable global-require */
import { Provider } from "react-redux";
import React from "react";
import { useFonts } from "expo-font";
import { enableFreeze } from "react-native-screens";
import store from "./store";
import Start from "./Start";
import * as SplashScreen from "expo-splash-screen";
import codePush from "react-native-code-push";
const codePushOptions = {
checkFrequency: codePush.CheckFrequency.ON_APP_RESUME,
installMode: codePush.InstallMode.ON_NEXT_RESTART,
minimumBackgroundDuration: 30,
};
SplashScreen.preventAutoHideAsync();
function App() {
enableFreeze(true);
const [fontsLoaded] = useFonts({
"Inter-Black": require("./assets/fonts/Inter-Black.otf"),
"Inter-BlackItalic": require("./assets/fonts/Inter-BlackItalic.otf"),
"Inter-Bold": require("./assets/fonts/Inter-Bold.otf"),
"Inter-BoldItalic": require("./assets/fonts/Inter-BoldItalic.otf"),
"Inter-ExtraBold": require("./assets/fonts/Inter-ExtraBold.otf"),
"Inter-ExtraBoldItalic": require("./assets/fonts/Inter-ExtraBoldItalic.otf"),
"Inter-ExtraLight": require("./assets/fonts/Inter-ExtraLight.otf"),
"Inter-ExtraLightItalic": require("./assets/fonts/Inter-ExtraLightItalic.otf"),
"Inter-Italic": require("./assets/fonts/Inter-Italic.otf"),
"Inter-Regular": require("./assets/fonts/Inter-Regular.otf"),
"Inter-Light": require("./assets/fonts/Inter-Light.otf"),
"Inter-LightItalic": require("./assets/fonts/Inter-LightItalic.otf"),
"Inter-Medium": require("./assets/fonts/Inter-Medium.otf"),
"Inter-MediumItalic": require("./assets/fonts/Inter-MediumItalic.otf"),
"Inter-SemiBold": require("./assets/fonts/Inter-SemiBold.otf"),
"Inter-SemiBoldItalic": require("./assets/fonts/Inter-SemiBoldItalic.otf"),
"Inter-Thin": require("./assets/fonts/Inter-Thin.otf"),
"Inter-ThinItalic": require("./assets/fonts/Inter-ThinItalic.otf"),
});
if (!fontsLoaded) {
return null;
}
const onReady = () => {
SplashScreen.hideAsync();
};
return (
<Provider store={store}>
<Start onReady={onReady} />
</Provider>
);
}
export default codePush(codePushOptions)(App);