-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.android.js
More file actions
45 lines (35 loc) · 1.04 KB
/
index.android.js
File metadata and controls
45 lines (35 loc) · 1.04 KB
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
'use strict'
import React, {
AppRegistry,
Component
} from 'react-native'
import {
connect,
Provider
} from 'react-redux'
import {
Router,
Route
} from 'react-native-router-flux'
import configureStore from './store'
import Settings from './components/Settings'
import Timesheets from './components/Timesheets'
import Nav from './components/Nav'
const store = configureStore()
class PhuseActivityMonitorNative extends Component {
render() {
return (
<Provider store={store}>
<Router hideNavBar={true}>
<Route name="settings" component={connect(mapStateToProps)(Settings)} initial={true} title="Activity" />
<Route name="index" component={connect(mapStateToProps)(Timesheets)} title="Activity" />
<Route name="nav" component={connect(mapStateToProps)(Nav)} type="modal" title="Nav" />
</Router>
</Provider>
)
}
}
function mapStateToProps(state) {
return state.timesheets
}
AppRegistry.registerComponent('PhuseActivityMonitorNative', () => PhuseActivityMonitorNative);