-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ios.js
107 lines (103 loc) · 3.19 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import React, { Component } from 'react';
import {
AppRegistry,
AsyncStorage,
Dimensions,
StyleSheet,
Text,
View
} from 'react-native';
import { ActionConst, Scene, Router } from 'react-native-router-flux';
import { Provider } from 'react-redux';
import store from './ios/app/state/store';
import wrapAuth from './ios/app/containers/wrapAuth';
import wrapTrips from './ios/app/containers/wrapTrips';
import wrapEntries from './ios/app/containers/wrapEntries';
import wrapPhotos from './ios/app/containers/wrapPhotos';
import Login from './ios/app/components/Login';
import Registration from './ios/app/components/Registration';
import TripsList from './ios/app/components/TripsList';
import AddTripForm from './ios/app/components/AddTripForm';
import EntriesList from './ios/app/components/EntriesList';
import AddEntryForm from './ios/app/components/AddEntryForm';
import UpdateEntryForm from './ios/app/components/UpdateEntryForm';
import CamRoll from './ios/app/components/CamRoll';
import CameraView from './ios/app/components/CameraView';
import PhotoView from './ios/app/components/PhotoView';
import TravelHistory from './ios/app/components/TravelHistory';
export default class Capstone extends Component {
render() {
return <Provider store={store}>
<Router>
<Scene key="root">
<Scene
component={wrapAuth(Login)}
hideNavBar={true}
initial={true}
key="login"
/>
<Scene
component={wrapAuth(Registration)}
hideNavBar={true}
key="registration"
/>
<Scene
component={wrapTrips(TripsList)}
hideNavBar={true}
key="tripslist"
type={ActionConst.REPLACE}
/>
<Scene
component={wrapTrips(AddTripForm)}
hideNavBar={true}
key="addtrip"
type={ActionConst.REPLACE}
/>
<Scene
component={wrapEntries(EntriesList)}
hideNavBar={true}
key="entrieslist"
type={ActionConst.REPLACE}
/>
<Scene
component={wrapEntries(AddEntryForm)}
hideNavBar={true}
key="addentry"
type={ActionConst.REPLACE}
/>
<Scene
component={wrapEntries(UpdateEntryForm)}
hideNavBar={true}
key="updateentry"
type={ActionConst.REPLACE}
/>
<Scene
component={wrapPhotos(CamRoll)}
hideNavBar={true}
key="camroll"
type={ActionConst.PUSH}
/>
<Scene
component={wrapPhotos(CameraView)}
hideNavBar={true}
key="camview"
type={ActionConst.PUSH}
/>
<Scene
component={PhotoView}
hideNavBar={true}
key="photoview"
type={ActionConst.PUSH}
/>
<Scene
component={wrapTrips(TravelHistory)}
hideNavBar={true}
key="history"
type={ActionConst.REPLACE}
/>
</Scene>
</Router>
</Provider>
}
}
AppRegistry.registerComponent('Capstone', () => Capstone);