-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
62 lines (56 loc) · 1.63 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import React from "react";
import Constants from "expo-constants";
import { Provider as PaperProvider } from "react-native-paper";
import * as SplashScreen from "expo-splash-screen";
import theme from "./src/theme";
import {
useFonts,
Roboto_300Light,
Roboto_400Regular,
Roboto_500Medium,
Roboto_700Bold,
} from "@expo-google-fonts/roboto";
import {
Poppins_300Light,
Poppins_400Regular,
Poppins_500Medium,
Poppins_600SemiBold,
Poppins_700Bold,
} from "@expo-google-fonts/poppins";
import { Text, View } from "react-native";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { ThemeProvider } from "styled-components/native";
import { Home } from "./src/screens/Home";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { StatusBar } from "expo-status-bar";
import { Routes } from "./src/routes";
export default function App() {
SplashScreen.preventAutoHideAsync();
const [fontsLoaded] = useFonts({
Roboto_300Light,
Roboto_400Regular,
Roboto_500Medium,
Roboto_700Bold,
Poppins_300Light,
Poppins_400Regular,
Poppins_500Medium,
Poppins_600SemiBold,
Poppins_700Bold,
});
if (!fontsLoaded) {
return null;
}
SplashScreen.hideAsync();
return (
<SafeAreaProvider style={{ marginTop: Constants.statusBarHeight }}>
<GestureHandlerRootView style={{ flex: 1 }}>
<StatusBar style="light" translucent backgroundColor="transparent" />
<ThemeProvider theme={theme}>
<PaperProvider>
<Routes />
</PaperProvider>
</ThemeProvider>
</GestureHandlerRootView>
</SafeAreaProvider>
);
}