-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
59 lines (51 loc) · 1.71 KB
/
App.js
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
import "react-native-gesture-handler";
import React from "react";
import { Provider } from "react-redux";
import * as eva from "@eva-design/eva";
import { ApplicationProvider, IconRegistry } from "@ui-kitten/components";
import { EvaIconsPack } from "@ui-kitten/eva-icons";
import {
Platform,
SafeAreaView,
StyleSheet,
StatusBar as AndroidSafeArea,
useColorScheme,
} from "react-native";
import { useFonts } from "expo-font";
import AppNavContainer from "./src/navigations";
import { store, persist } from "./src/redux/store";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { PersistGate } from "redux-persist/integration/react";
const App = () => {
const isDarkMode = useColorScheme();
const [fontsLoaded] = useFonts({
"SFP-regular": require("./assets/fonts/SF-Pro-Display-Regular.otf"),
"SFP-semibold": require("./assets/fonts/SF-Pro-Display-Semibold.otf"),
"SFP-medium": require("./assets/fonts/SF-Pro-Display-Medium.otf"),
"SFP-bold": require("./assets/fonts/SF-Pro-Display-Bold.otf"),
});
if (!fontsLoaded) {
return null;
}
return (
<Provider {...{ store }}>
<PersistGate persistor={persist} loading={null}>
<IconRegistry icons={EvaIconsPack} />
<ApplicationProvider {...eva} theme={eva[isDarkMode]}>
<SafeAreaProvider style={styles.container}>
<AppNavContainer />
{/* <StatusBar style="auto" /> */}
</SafeAreaProvider>
</ApplicationProvider>
</PersistGate>
</Provider>
);
};
export default App;
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
// paddingTop: Platform.OS === "android" ? AndroidSafeArea.currentHeight : 0,
},
});