-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathApp.js
34 lines (32 loc) · 868 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
32
33
34
import React, { useState } from 'react';
import * as Font from 'expo-font';
import { AppLoading } from 'expo';
import * as eva from '@eva-design/eva';
import { ApplicationProvider, IconRegistry } from '@ui-kitten/components';
import { EvaIconsPack } from '@ui-kitten/eva-icons';
import { AppNavigator } from './components/DrawerNavigation';
const loadFonts = () => {
return Font.loadAsync({
'Consolas': require('./assets/fonts/Consolas.ttf')
});
};
export default function App() {
const [fontLoaded, setFontLoaded] = useState(false);
if(!fontLoaded) {
return (
<AppLoading
startAsync={loadFonts}
onFinish={() => setFontLoaded(true)}
onError={(err) => console.error(err)}
/>
);
}
return (
<>
<IconRegistry icons={EvaIconsPack}/>
<ApplicationProvider {...eva} theme={eva.light}>
<AppNavigator/>
</ApplicationProvider>
</>
);
}