-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.js
31 lines (28 loc) · 869 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
import React, { useState, useEffect } from "react";
import { ActivityIndicator } from "react-native";
import * as Font from "expo-font";
import Navigation from "./navigation/switch";
import { Provider, useSelector } from 'react-redux'
import store from './store'
export default function App() {
const [font, setFont] = useState(false);
useEffect(() => {
Font.loadAsync({
"sf-light": require("./assets/font/sf_light.otf"),
"sf-medium": require("./assets/font/sf_medium.otf"),
"sf-regular": require("./assets/font/sf_regular.otf"),
"sf-semibold": require("./assets/font/sf_semibold.otf"),
}).then(() => {
setFont(true);
});
}, []);
if (font) {
return (
<Provider store={ store }>
<Navigation />
</Provider>
);
} else {
return <ActivityIndicator size="large" color="#512DA8" />;
}
}