-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.android.js
36 lines (32 loc) · 1.05 KB
/
index.android.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
import React, {Component} from 'react';
import {AppRegistry, Navigator, Text} from 'react-native';
import LoginScene from './Scenes/LoginScene';
import PersonalInfo from './Scenes/PersonalInfo';
import SharedPreferences from 'react-native-shared-preferences';
import JPushModule from 'jpush-react-native';
const scenes = {
LoginScene: LoginScene,
PersonalInfo: PersonalInfo
};
class MojitoGuardian extends Component {
constructor(props) {
super(props);
this.state = {
leftButton: 'Back',
initRoute: 'LoginScene'
};
}
render() {
return (
<Navigator
initialRoute={{title: this.state.initRoute}}
configureScene={(route) => Navigator.SceneConfigs.FloatFromRight}
renderScene={(route, navigator) => {
let Component = scenes[route.title];
return <Component navigator={navigator} />
}}
/>
);
}
}
AppRegistry.registerComponent('Mojito_Guardian', () => MojitoGuardian);