-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ios.js
81 lines (74 loc) · 2.41 KB
/
index.ios.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import React, {Component} from 'react';
import {AppRegistry, StyleSheet, Text, View, Navigator} from 'react-native';
import { MenuContext } from 'react-native-menu';
import Register from './register';
import Login from './login';
import Root from './root';
import Home from './home';
import RegistrationComplete from './registrationComplete';
import Assets from './assets';
import Account from './account';
import MyCamera from './components/myCamera';
import PicPreview from './components/picPreview';
import ImageGallery from './imageGallery';
import CaptureAsset from './captureAsset'
// import Scratch from './scratch';
import styles from './styles';
export default class seekerMobile extends Component {
renderScene(route, navigator) {
if (route.name == 'root') {
return <Root navigator={navigator}/>
}
if (route.name == 'register') {
return <Register navigator={navigator}/>
}
if (route.name == 'login') {
return <Login navigator={navigator}/>
}
if (route.name == 'home') {
return <Home navigator={navigator} {... route.props}/>
}
if (route.name == 'registrationComplete') {
return <RegistrationComplete navigator={navigator}/>
}
if (route.name == 'assets') {
//console.log("routing assets");
return <Assets navigator={navigator} {... route.props} />
}
if (route.name == 'myCamera') {
//console.log("routing myCamera");
return <MyCamera navigator={navigator} {... route.props} />
}
if (route.name == 'picPreview') {
//console.log("routing picPreview");
return <PicPreview navigator={navigator} {...route.props} />
}
if(route.name == 'imageGallery') {
//console.log("routing image gallery");
return <ImageGallery navigator={navigator} {...route.props} />
}
if(route.name == 'capture') {
//console.log("routing capture asset");
return <CaptureAsset navigator={navigator} {...route.props} />
}
if(route.name == 'account') {
//console.log("routing capture asset");
return <Account navigator={navigator} {...route.props} />
}
}
render() {
return (
<MenuContext style={styles.container}>
<Navigator
initialRoute={{
name: "root"
}}
renderScene={this
.renderScene
.bind(this)}
/>
</MenuContext>
);
}
}
AppRegistry.registerComponent('seekerMobile', () => seekerMobile);