-
Notifications
You must be signed in to change notification settings - Fork 7
/
App.tsx
69 lines (67 loc) · 1.6 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
63
64
65
66
67
68
69
import { PortalHost, PortalProvider } from "@gorhom/portal";
import {
DefaultTheme,
NavigationContainer,
Theme,
} from "@react-navigation/native";
import React from "react";
import { StyleSheet } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import { MainNavigator } from "./src/Navigation";
import {
useFonts,
Inter_100Thin,
Inter_200ExtraLight,
Inter_300Light,
Inter_400Regular,
Inter_500Medium,
Inter_600SemiBold,
Inter_700Bold,
Inter_800ExtraBold,
Inter_900Black,
} from "@expo-google-fonts/inter";
import AppLoading from "expo-app-loading";
import { Provider } from "react-redux";
import { store } from "./src/store";
const MyTheme: Theme = {
...DefaultTheme,
colors: {
...DefaultTheme.colors,
primary: "#27ae61",
card: "#5576AB",
background: "#f2f0e4",
},
};
export default function App() {
let [fontsLoaded] = useFonts({
Inter_900Black,
Inter_100Thin,
Inter_200ExtraLight,
Inter_300Light,
Inter_400Regular,
Inter_500Medium,
Inter_600SemiBold,
Inter_700Bold,
Inter_800ExtraBold,
});
return (
<Provider store={store}>
<SafeAreaView style={{ flex: 1, zIndex: 1 }}>
<NavigationContainer theme={MyTheme}>
<PortalProvider>
<PortalHost name="h" />
{fontsLoaded ? <MainNavigator /> : <AppLoading />}
</PortalProvider>
</NavigationContainer>
</SafeAreaView>
</Provider>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
},
});