-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
55 lines (44 loc) · 1.13 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
import React, { useState, useEffect } from "react";
import { Apploading } from "expo";
import { Provider } from "react-redux";
import { store } from "./redux/store";
import Main from "./components/Main";
import * as Font from 'expo-font';
export default function App() {
const [iasReady, setIasReady] = useState(false);
const loadApplication = async () => {
await Font.loadAsync({
"Roboto-Regular": require("./assets/fonts/Roboto-Regular.ttf"),
});
setIasReady(true)
};
useEffect(() => {
loadApplication()
}, [])
// if (!iasReady) {
// return (
// <Apploading
// startAsync={loadApplication}
// onFinish={() => setIasReady(true)}
// onError={console.warn}
// />
// )
// }
// if (!iasReady) {
// async () => {
// await Font.loadAsync({
// "Roboto-Regular": require("./assets/fonts/Roboto-Regular.ttf"),
// });
// setIasReady(true)
// };
// var promise = await loadApplication()
// promise.then(setIasReady(true))
// }
if (iasReady) {
return (
<Provider store={store}>
<Main />
</Provider>
);
}
}