-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrouter.js
More file actions
31 lines (25 loc) · 797 Bytes
/
router.js
File metadata and controls
31 lines (25 loc) · 797 Bytes
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
import React, { Component } from 'react';
import { Router, Scene, Actions } from 'react-native-router-flux';
import MapContainer from './components/map/map_container.js';
import SessionFormContainer from './components/session/session_form_container.js';
import App from './app.js';
class AppRouter extends Component {
constructor(props) {
super(props);
}
render() {
return (
<Router hideNavBar={true}>
<Scene key="root">
<Scene key="loginScreen" component={SessionFormContainer} panHandlers={null}
initial={true} />
<Scene key="mapScreen" component={MapContainer} panHandlers={null} />
</Scene>
</Router>
);
}
}
AppRouter.contextTypes = {
store: React.PropTypes.object.isRequired
};
export default AppRouter;