-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
48 lines (41 loc) · 960 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
36
37
38
39
40
41
42
43
44
45
46
47
48
import 'intl';
import 'intl/locale-data/jsonp/pt-BR';
import { StatusBar } from 'expo-status-bar';
import React, { useEffect } from 'react';
import * as SplashScreen from 'expo-splash-screen';
import { useFonts } from 'expo-font';
import {
Archivo_400Regular,
Archivo_700Bold,
} from '@expo-google-fonts/archivo';
import {
Poppins_400Regular,
Poppins_600SemiBold,
} from '@expo-google-fonts/poppins';
import { AppStack } from './src/routes/AppStack';
SplashScreen.preventAutoHideAsync();
const App = () => {
const [fontsLoaded] = useFonts({
Archivo_400Regular,
Archivo_700Bold,
Poppins_400Regular,
Poppins_600SemiBold,
});
useEffect(() => {
(async () => {
if (fontsLoaded) {
await SplashScreen.hideAsync();
}
})();
}, [fontsLoaded]);
if (fontsLoaded) {
return (
<>
<AppStack />
<StatusBar style="light" />
</>
);
}
return null;
};
export default App;