This repository has been archived by the owner on Dec 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
72 lines (64 loc) · 1.61 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import React, { Component } from 'react'
import { StyleSheet, Text, View } from 'react-native'
import { Provider } from 'react-redux'
import { StackNavigator } from 'react-navigation'
import { store, persistor } from './store'
import { PersistGate } from 'redux-persist/es/integration/react'
import { MaterialIcons } from '@expo/vector-icons'
import { darkTeal } from './utils/colors'
import { setLocalNotification } from './utils/helpers'
// proj components
import DeckList from './components/DeckList'
import DeckCover from './components/DeckCover'
import DeckCreator from './components/DeckCreator'
import CardCreator from './components/CardCreator'
import Quiz from './components/Quiz'
import QuizResult from './components/QuizResult'
import QuizCards from './components/QuizCards'
export default class App extends Component {
componentDidMount() {
setLocalNotification()
}
render() {
return (
<Provider store={store}>
<PersistGate persistor={persistor}>
<View style={styles.container}>
<RootNav />
</View>
</PersistGate>
</Provider>
)
}
}
const RootNav = StackNavigator({ // RootNav renders like a component, with Home as default
Home: {
screen: DeckList,
navigationOptions: {
headerLeft: null,
}
},
DeckCover: {
screen: DeckCover,
},
DeckCreator: {
screen: DeckCreator,
},
CardCreator: {
screen: CardCreator,
},
Quiz: {
screen: Quiz,
},
QuizCards: {
screen: QuizCards,
},
QuizResult: {
screen: QuizResult,
},
});
const styles = StyleSheet.create({
container: {
flex: 1,
},
});