-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
50 lines (46 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
import React, { Component, useEffect } from 'react';
import { StyleSheet, SafeAreaView } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import reducer from './reducers';
// You can import from local files
import middleware from './middleware';
import Constants from 'expo-constants';
import StatusBarDisplay from './components/StatusBarDisplay';
import NavigationSection from './components/Navigation/index';
import { handleInitialData } from './actions';
// or any pure javascript modules available in npm
import { resetDecksAsync } from './utils/_DATA';
import { white } from './utils/colors';
import { setLocalNotification } from './utils/helpers';
const store = createStore(reducer, middleware);
class App extends Component {
componentDidMount() {
store.dispatch(handleInitialData());
this.setNotification
}
setNotification = () =>{
useEffect(()=>{
setLocalNotification()
}, []);
}
render() {
return (
<Provider store={store}>
<SafeAreaView style={styles.container}>
<StatusBarDisplay backgroundColor={white} />
<NavigationContainer>
<NavigationSection />
</NavigationContainer>
</SafeAreaView>
</Provider>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
});
export default App;