-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathApp.js
More file actions
45 lines (40 loc) · 1.29 KB
/
App.js
File metadata and controls
45 lines (40 loc) · 1.29 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, {Component} from 'react';
import {Platform, StyleSheet,View, StatusBar,Dimensions,
TouchableOpacity,} from 'react-native';
import AppContainer from './components/Navigator'
import {store,persistor} from './redux/reducer'
import {Provider} from 'react-redux'
import { PersistGate } from 'redux-persist/integration/react'
import GLOBALS from './components/Globals'
import SplashScreen from "rn-splash-screen";
const MyStatusBar = ({backgroundColor, ...props}) => (
<View style={[styles.statusBar, { backgroundColor }]}>
<StatusBar translucent backgroundColor={backgroundColor} {...props} />
</View>
);
export default class App extends React.Component {
componentWillMount() {
SplashScreen.hide();
}
render() {
return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<View style={styles.container}>
<MyStatusBar backgroundColor= {GLOBALS.COLORS.YELLOW} barStyle="dark-content" />
<AppContainer />
</View>
</PersistGate>
</Provider>
);
}
}
const STATUSBAR_HEIGHT = Platform.OS === 'ios' ? 20 : StatusBar.currentHeight;
const styles = StyleSheet.create({
container: {
flex: 1,
},
statusBar:{
height: STATUSBAR_HEIGHT
}
});