-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
executable file
·55 lines (49 loc) · 1.39 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
52
53
54
55
import React from 'react'
import { createBottomTabNavigator, createAppContainer, createStackNavigator } from 'react-navigation'
import { Provider } from 'react-redux'
import { Notifications, Permissions } from 'expo'
import NewDeckView from './components/deck/pages/NewDeckView'
import ListDecksView from './components/deck/pages/ListDecksView'
import store from './config/store'
import NewCardQuizView from './components/card/pages/NewCardQuizView'
import CardQuizView from './components/card/pages/CardQuizView'
import DeckView from './components/deck/pages/DeckView'
import { setLocalNotification, createNotification } from './utils/helper'
const TabNavigator = createBottomTabNavigator({
"DECK LIST": {
screen: ListDecksView,
},
"NEW DECK": {
screen: NewDeckView,
},
})
const Stack = createStackNavigator({
home: {
screen: TabNavigator,
},
addCard: {
screen: NewCardQuizView,
},
startQuiz:{
screen: CardQuizView,
},
deckView:{
screen: DeckView,
}
})
const Containers = createAppContainer(Stack);
class App extends React.Component {
componentDidMount(){
//to test notification uncomment the line 43
//Notifications.presentLocalNotificationAsync(createNotification())
setLocalNotification()
}
render() {
return (
<Provider store={store}>
<Containers navigation={this.props.navigation}/>
</Provider>
)
}
}
export default App