-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
127 lines (116 loc) · 2.85 KB
/
App.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import React from 'react';
import { StyleSheet, Text, View, WebView, ScrollView, Button, Alert, Image } from 'react-native';
import {createBottomTabNavigator, SafeAreaView, createStackNavigator} from 'react-navigation';
class RockStarterScreen extends React.Component {
render() {
return (
<WebView
source = {{uri: 'https://sttefoundation.org/RockStar'}}
style = {{marginTop: 30, flex: 1}}
/>
);
}
}
class QuestionOTDScreen extends React.Component{
render(){
return(
<SafeAreaView>
<ScrollView>
<Text style = {{fontSize: 30, alignSelf: 'center'}}> Question Of The Day!</Text>
<Text
style = {{fontSize: 20, paddingTop: 30, paddingBottom: 30, alignSelf: 'center'}}>
How many things make up a bakers dozen? </Text>
<Button
onPress = {() => {
Alert.alert('You are Correct')
}}
title = "13"/>
<Button
onPress = {() => {
Alert.alert('You are Incorrect')
}}
title = "12"/>
</ScrollView>
</SafeAreaView>
);
}
}
class EventsScreen extends React.Component{
render(){
return(
<WebView
source = {{uri: 'https://sttefoundation.org/glitch'}}
style = {{marginTop: 30, flex: 1}}
/>
);
}
}
class ProgramsScreen extends React.Component{
render(){
return(
<ScrollView>
<Button
title= 'Events Page'
onPress= {() => this.props.navigation.navigate('Events')} />
<Button
title= 'QuestionOTD Page'
onPress= {() => this.props.navigation.navigate('QuestionOTD')} />
<Button
title= 'Programs Page'
onPress= {() => this.props.navigation.navigate('Programs')} />
</ScrollView>
);
}
}
class ActivityCell extends React.Component{
render(){
return(
<View>
<Text style = {{fontSize: 20, paddingTop: 120, alignSelf: 'center'}}> {this.props.projectTitle} </Text>
<Image source = {require('./Assets/Bannana.jpg')} style = {{height: 120, width: 193, alignSelf: 'center'}}/>
<Button
onPress = {() => {
this.props.navigation.navigate('Events')
}}
title = "Events"/>
</View>
);
}
}
/*export default createBottomTabNavigator({
Rockstarter: RockStarterScreen,
QuestionOTD: QuestionOTDScreen,
Events: EventsScreen,
Programs: ProgramsScreen,
});
*/
export default class App extends React.Component{
render(){
return <RootStack />;
}
}
const RootStack = createStackNavigator({
Home: {
screen: ProgramsScreen
},
Events: {
screen: EventsScreen
},
QuestionOTD: {
screen: QuestionOTDScreen
},
Programs:{
screen: RockStarterScreen
}
});
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
text: {
fontSize: 30,
},
});