-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
50 lines (44 loc) · 1.08 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 from 'react';
import {AppLoading} from 'expo';
import App from './js/containers/App';
import Settings from './js/containers/Settings';
import {Provider} from 'react-redux';
import configureStore from './js/store/configureStore';
import {PersistGate} from 'redux-persist/integration/react';
import {StackNavigator} from 'react-navigation';
const Navigator = StackNavigator({
Home: {
screen: App,
navigationOptions: {
header: null,
},
},
Settings: {
screen: Settings,
navigationOptions: {
headerStyle: {
backgroundColor: '#2096f2',
},
headerTintColor: '#fff',
title: 'Settings',
headerTitleStyle: {
// For some reason we need to set a width for the
// title otherwise the text will be elpised "sett.." :(
width: 150,
},
},
},
});
export default () => {
const {
store,
persistor,
} = configureStore();
return (
<Provider store={store}>
<PersistGate loading={<AppLoading />} persistor={persistor}>
<Navigator />
</PersistGate>
</Provider>
);
};