-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
41 lines (35 loc) · 1.21 KB
/
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
import { useFonts } from 'expo-font';
import React from 'react';
import { View } from 'react-native';
import { PaperProvider } from 'react-native-paper';
import Navigation from './src/navigation';
import * as SplashScreen from 'expo-splash-screen'
import { RootSiblingParent } from 'react-native-root-siblings';
import 'react-native-reanimated'
import 'react-native-gesture-handler'
SplashScreen.preventAutoHideAsync()
export default function App() {
const [isLoaded] = useFonts({
'300': require('./src/assets/fonts/Inter-Light.ttf'),
'400': require('./src/assets/fonts/Inter-Regular.ttf'),
'500': require('./src/assets/fonts/Inter-Medium.ttf'),
'600': require('./src/assets/fonts/Inter-SemiBold.ttf'),
'700': require('./src/assets/fonts/Inter-Bold.ttf'),
'800': require('./src/assets/fonts/Inter-ExtraBold.ttf'),
})
const handleOnLayout = async () => {
if (isLoaded) {
await SplashScreen.hideAsync()
}
}
if (!isLoaded) return null
return (
<RootSiblingParent>
<View style={{ flex: 1 }} onLayout={handleOnLayout}>
<PaperProvider theme={{ mode: 'exact', dark: false }}>
<Navigation />
</PaperProvider>
</View>
</RootSiblingParent>
);
}