-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ios.js
76 lines (67 loc) · 2.45 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
'use strict';
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Navigator,
TouchableOpacity,
} from 'react-native';
import SplashScreen from './Screens/SplashScreen'
import EventsMenu from './Screens/Events/EventsMenu'
import EventDetails from './Screens/Events/EventDetails'
import EditEvent from './Screens/Events/EditEvent'
import AddEvent from './Screens/Events/AddEvent'
import ActivityHub from './Screens/Activities/ActivitiesHub'
import AddActivity from './Screens/Activities/AddActivity'
import EditActivity from './Screens/Activities/EditActivity'
import ActivityDetails from './Screens/Activities/ActivityDetails'
import SubmitSurvey from './Screens/Surveys/SubmitSurvey'
import ViewSurveys from './Screens/Surveys/ViewSurveys'
import UserManagement from './Screens/User Management/UserManagement'
class TrainingCampApp extends Component{
_renderScene(route, nav) {
switch (route.screen) {
//Note: have to use {...route.passProps} for passProps in SplashScreen to work properly
case "SplashScreen":
return <SplashScreen navigator={nav} {...route.passProps} />
case "MainMenu":
return <EventsMenu navigator={nav} {...route.passProps} />
case "EventDetails":
return <EventDetails navigator={nav} {...route.passProps} />
case "SubmitSurvey":
return <SubmitSurvey navigator={nav} {...route.passProps} />
case "EditEvent":
return <EditEvent navigator={nav} {...route.passProps} />
case "AddEvent":
return <AddEvent navigator={nav} {...route.passProps} />
case "ActivitiesHub":
return <ActivityHub navigator={nav} {...route.passProps} />
case "AddActivity":
return <AddActivity navigator={nav} {...route.passProps} />
case "EditActivity":
return <EditActivity navigator={nav} {...route.passProps} />
case "ActivityDetails":
return <ActivityDetails navigator={nav} {...route.passProps} />
case "ViewSurveys":
return <ViewSurveys navigator={nav} {...route.passProps} />
case "UserManagement":
return <UserManagement navigator={nav} {...route.passProps} />
}
}
render() {
return (
<Navigator
initialRoute={{screen: 'SplashScreen'}}
renderScene={(route, nav) => {return this._renderScene(route, nav)}}
configureScene={() => ({
...Navigator.SceneConfigs.FloatFromLeft,
gestures: {},
})
}
/>
)
}
}
AppRegistry.registerComponent('SogetiTrainingCamp', () => TrainingCampApp);