-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.ios.js
56 lines (42 loc) · 1.26 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
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
ScrollView,
StatusBar,
Dimensions,
Navigator
} from 'react-native';
import Header from './src/components/header';
import LessonTitleCard from './src/components/lessonTitleCard';
import LessonTitleCardList from './src/components/LessonTitleCardList';
import Login from './src/components/login';
import Lesson from './src/components/Lesson';
import LessonComplete from './src/components/LessonComplete';
class scripty extends Component {
renderScene(route, navigator) {
const { name, passProps } = route;
if (name === 'Home') {
return <LessonTitleCardList navigator={navigator} />
} else if (name === 'Login') {
return <Login navigator={navigator} />
} else if (name === 'Lesson') {
return <Lesson navigator={navigator} {...passProps} />
} else if (name === 'LessonComplete') {
return <LessonComplete navigator={navigator} {...passProps} />
}
}
render() {
return (
<Navigator
style={{ backgroundColor: 'white', }}
navigationBar={<Header />}
initialRoute={{ name:'Login' }}
renderScene={this.renderScene}
/>
)
}
};
AppRegistry.registerComponent('scripty', () => scripty);