-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.android.js
63 lines (58 loc) · 1.48 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
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
import React, { Component } from 'react';
import {
AppRegistry,
Text,
Navigator,
View
} from 'react-native';
import Login from './ios/app/containers/Login';
import Registration from './ios/app/containers/Registration';
export default class Capstone extends Component {
constructor() {
super();
this.renderScene = this.renderScene.bind(this);
}
renderScene(route, navigator) {
switch (route.name) {
case 'login': {
return <Login
navigator={navigator}
/>
break;
}
case 'registration': {
return <Registration
navigator={navigator}
/>
break;
}
default: {
return <View>
<Text>ERROR</Text>
</View>
}
}
}
render() {
return (
<Navigator
initialRoute={{name: 'login'}}
renderScene={this.renderScene}
// navigationBar={
// <Navigator.NavigationBar
// routeMapper={{
// LeftButton: (route, navigator, index, navState) =>
// { return (<Text>Cancel</Text>); },
// RightButton: (route, navigator, index, navState) =>
// { return (<Text>Done</Text>); },
// Title: (route, navigator, index, navState) =>
// { return (<Text>Awesome Nav Bar</Text>); },
// }}
// style={{backgroundColor: 'gray'}}
// />
// }
/>
);
}
}
AppRegistry.registerComponent('Capstone', () => Capstone);