forked from spicygreenbook/greenbook-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
31 lines (24 loc) · 969 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, { useEffect, useState } from "react";
import { Platform } from 'react-native';
import * as Font from 'expo-font';
import Web from './pages';
import Rootnavigator from './navigations/RootNavigator';
function App() {
const [loaded, setLoaded] = useState(false);
const APP = Platform.OS === 'web' ? <Web /> : <Rootnavigator />
useEffect(() => {
const loadFont = async () => {
await Font.loadAsync({
'ApercuMedium': require('./public/fonts/ApercuRegular.ttf'),
'ApercuLight': require('./public/fonts/ApercuLight.ttf'),
'KnockoutBold': require('./public/fonts/Knockout_HTF71-FullMiddlewt_Regular.otf'),
'KnockoutWelterWeight': require('./public/fonts/Knockout_HTF50-Welterweight_Regular.otf'),
'KnockoutFeatherWeight': require('./public/fonts/Knockout_HTF48-Featherweight_Regular.otf')
});
setLoaded(true);
};
loadFont();
}, []);
return loaded && APP;
}
export default App;