-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
35 lines (30 loc) · 888 Bytes
/
App.tsx
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
/* eslint-disable global-require */
import React, { useEffect, useState } from 'react';
import * as Font from 'expo-font';
import FlashMessage from 'react-native-flash-message';
import { Navigation } from './app/navigation';
import { LoaderProvider } from './app/contexts';
export default function App() {
const [fontLoaded, setFontLoaded] = useState(false);
const loadFont = async () => {
await Font.loadAsync({
RobotoBold: require('./assets/fonts/Roboto-Bold.ttf'),
RobotoMedium: require('./assets/fonts/Roboto-Medium.ttf'),
RobotoRegular: require('./assets/fonts/Roboto-Regular.ttf'),
});
setFontLoaded(true);
};
useEffect(() => {
loadFont();
}, []);
return (
fontLoaded ? (
<>
<LoaderProvider>
<Navigation />
</LoaderProvider>
<FlashMessage position="top" />
</>
) : null
);
}