-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
45 lines (42 loc) · 1.07 KB
/
App.js
File metadata and controls
45 lines (42 loc) · 1.07 KB
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
import React from "react";
import { Provider } from "react-redux";
import { store } from "./src/store";
import AppStack from "./src/navigation/app-stack";
import {
StatusBar,
SafeAreaView,
StyleSheet,
View,
Platform,
} from "react-native";
import { COLORS } from "./src/assets";
const App = () => {
const MyStatusBar = ({ backgroundColor, ...props }) => (
<View style={[s.statusBar, { backgroundColor }]}>
<StatusBar translucent backgroundColor={backgroundColor} {...props} />
</View>
);
return (
<Provider store={store}>
<MyStatusBar barStyle="light-content" backgroundColor={COLORS.gray} />
<SafeAreaView style={s.container}>
<AppStack />
</SafeAreaView>
</Provider>
);
};
export default App;
const STATUSBAR_HEIGHT = Platform.OS === "ios" ? 20 : StatusBar.currentHeight;
const APPBAR_HEIGHT = Platform.OS === "ios" ? 44 : 56;
const s = StyleSheet.create({
container: {
flex: 1,
},
statusBar: {
height: STATUSBAR_HEIGHT,
},
appBar: {
backgroundColor: "#79B45D",
height: APPBAR_HEIGHT,
},
});