-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
33 lines (27 loc) · 842 Bytes
/
Copy pathApp.js
File metadata and controls
33 lines (27 loc) · 842 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
import { NavigationContainer } from '@react-navigation/native';
import { useFonts } from 'expo-font';
import { useCallback } from 'react';
import { View } from 'react-native';
import * as SplashScreen from "expo-splash-screen";
import AuthStack from './src/components/AuthStack';
export default function App() {
const [fontsLoaded] = useFonts({
"Roboto-Regular": require("./assets/fonts/Roboto-Regular.ttf"),
"Roboto-Medium": require("./assets/fonts/Roboto-Medium.ttf"),
});
const onLayoutRootView = useCallback(async () => {
if (fontsLoaded) {
await SplashScreen.hideAsync();
}
}, [fontsLoaded]);
if (!fontsLoaded) {
return null;
}
return (
<NavigationContainer>
<View style={{flex:1}} onLayout={onLayoutRootView}>
<AuthStack />
</View>
</NavigationContainer>
);
}