-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
70 lines (52 loc) · 1.67 KB
/
App.tsx
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
60
61
62
63
64
65
66
67
68
69
70
import React from 'react';
import { StyleSheet, Text, View,AsyncStorage,StatusBar } from 'react-native';
import Deck from './Components/Deck'
import DeckView from './Components/DeckView'
import DeckList from './Components/DeckList'
import DeckDetail from './Components/DeckDetail'
import APITest from './Components/APITest'
import TestAsyncStorage from './Components/TestAsyncStorage'
//REDUX IMPORTS
import reducer from './reducers/index'
import actions from './actions'
import logger from 'redux-logger'
import thunk from 'redux-thunk'
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import Reactotron from 'reactotron-react-native'
import Constants from 'expo-constants';
import AddDeck from './Components/AddDeck'
import { makeNotification } from './helpers/Notifications';
import Navigation from './Components/Navigation'
/*🔥store Creation with reducers and Middleware🔥 */
const store = createStore(
reducer,
applyMiddleware(thunk, logger)
);
function MainStatusBar({ backgroundColor, ...props }) {
return (
<View style={{ backgroundColor, height: Constants.statusBarHeight }}>
<StatusBar translucent backgroundColor={backgroundColor} {...props} />
</View>
);
}
export default class App extends React.Component {
componentDidMount() {
//notification should be placed in the componentDidMount
makeNotification();
}
render()
{
return(
<Provider store={store}>
<MainStatusBar
backgroundColor="blue"
barStyle="light-content"
/>
<Navigation />
</Provider>
);
}
}
const styles = StyleSheet.create({
});