-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
36 lines (31 loc) · 840 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
import { ActivityIndicator, StyleSheet, Text, View } from "react-native";
import {
Montserrat_500Medium,
Montserrat_700Bold,
} from "@expo-google-fonts/montserrat";
import { useFonts } from "expo-font";
import AppNavigator from "@src/router/AppNavigator";
import { useMemo } from "react";
export default function App() {
let [fontsLoaded] = useFonts({
Montserrat_500Medium,
Montserrat_700Bold,
});
const shouldLoad = useMemo(() => !fontsLoaded, [fontsLoaded]);
if (shouldLoad) {
return (
<View style={styles.container}>
<ActivityIndicator size={"large"} color={"white"} />
</View>
);
}
return <AppNavigator></AppNavigator>;
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
},
});