-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathApp.js
51 lines (47 loc) · 1.35 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
import React from 'react';
import PropTypes from 'prop-types';
import { StyleSheet, View, StatusBar } from 'react-native';
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import logger from 'redux-logger';
import { Provider } from 'react-redux';
import reducer from './reducers/index';
import Constants from 'expo-constants';
import BottomNavigation from './components/BottomNavigation';
import { SET_NOTIFICATION } from './helpers/notify_handler';
function ApplicationStatusBar({ backgroundColor, ...props }) {
return (
<View style={{ backgroundColor, height: Constants.statusBarHeight }}>
<StatusBar translucent backgroundColor={backgroundColor} {...props} />
</View>
);
}
ApplicationStatusBar.propTypes = {
backgroundColor: PropTypes.string.isRequired
};
const store = createStore(
reducer /* preloadedState, */,
applyMiddleware(thunk, logger)
);
export default class App extends React.Component {
componentDidMount() {
SET_NOTIFICATION();
}
render() {
return (
<Provider store={store}>
<View style={styles.container}>
<ApplicationStatusBar
backgroundColor="#291541"
barStyle="light-content"
/>
<BottomNavigation />
</View>
</Provider>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1}
});