-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
33 lines (28 loc) · 837 Bytes
/
App.js
File metadata and controls
33 lines (28 loc) · 837 Bytes
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
import AppNavigation from './navigation/appNavigation';
import * as Font from 'expo-font';
import { useEffect, useState } from 'react';
import { StatusBar } from 'expo-status-bar';
export default function App() {
const [isFontLoaded, setFontLoaded] = useState(false);
const loadCustomFont = async () => {
await Font.loadAsync({
exo: require('./assets/fonts/Exo/static/Exo-Regular.ttf'),
exoSemibold: require('./assets/fonts/Exo/static/Exo-SemiBold.ttf'),
roboto: require('./assets/fonts/Roboto/Roboto-Light.ttf'),
robotoBold: require('./assets/fonts/Roboto/Roboto-Bold.ttf'),
});
setFontLoaded(true);
};
useEffect(() => {
loadCustomFont();
}, []);
if (!isFontLoaded) {
return null;
}
return (
<>
<StatusBar style="dark" />
<AppNavigation />
</>
);
}