2020-08-09 17:01:25 -04:00
|
|
|
import React from 'react';
|
|
|
|
import {
|
|
|
|
SafeAreaView,
|
|
|
|
StyleSheet,
|
|
|
|
ScrollView,
|
|
|
|
View,
|
|
|
|
Text,
|
|
|
|
StatusBar,
|
2020-08-09 20:56:12 -04:00
|
|
|
FlatList,
|
|
|
|
TouchableOpacity
|
2020-08-09 17:01:25 -04:00
|
|
|
} from 'react-native';
|
|
|
|
|
|
|
|
import {
|
|
|
|
Header,
|
|
|
|
LearnMoreLinks,
|
|
|
|
Colors,
|
|
|
|
DebugInstructions,
|
|
|
|
ReloadInstructions,
|
|
|
|
} from 'react-native/Libraries/NewAppScreen';
|
|
|
|
|
2020-08-09 20:56:12 -04:00
|
|
|
import { NavigationContainer } from '@react-navigation/native'
|
|
|
|
import { createStackNavigator } from '@react-navigation/stack'
|
|
|
|
|
|
|
|
import styles from './styles/morestyles'
|
|
|
|
import Announcements from './Announcements'
|
|
|
|
import Resources from './Resources'
|
|
|
|
import StudentWeek from './StudentWeek'
|
|
|
|
import SSLOps from './SSLOps'
|
2020-08-09 21:27:58 -04:00
|
|
|
import LunchEvents from './LunchEvents'
|
2020-08-10 16:06:01 -04:00
|
|
|
import { LinearGradient } from 'react-native-linear-gradient'
|
2020-08-09 20:56:12 -04:00
|
|
|
|
|
|
|
const Stack = createStackNavigator()
|
|
|
|
|
|
|
|
class MoreSwitch extends React.Component {
|
|
|
|
constructor(props) {
|
|
|
|
super(props)
|
|
|
|
this.props = props
|
|
|
|
}
|
|
|
|
|
2020-08-09 17:01:25 -04:00
|
|
|
render() {
|
|
|
|
return (
|
2020-08-09 21:27:58 -04:00
|
|
|
<View style={{flex:1,backgroundColor:'red'}}>
|
2020-08-09 20:56:12 -04:00
|
|
|
<FlatList
|
|
|
|
data={[
|
|
|
|
{name:"Announcements",key:"announce"},
|
|
|
|
{name:"Resources",key:"resources"},
|
|
|
|
{name:"Student of the Week",key:"studentweek"},
|
2020-08-09 21:27:58 -04:00
|
|
|
{name:"Lunch Events",key:"lunchevent"},
|
2020-08-09 20:56:12 -04:00
|
|
|
{name:"SSL Opportunities",key:"sslops"}
|
|
|
|
]}
|
|
|
|
renderItem={({item})=>
|
|
|
|
<TouchableOpacity style={styles.moreitem} onPress={()=>this.props.navigation.navigate(item.key)}>
|
|
|
|
<Text style={styles.moretext}>{item.name}</Text>
|
|
|
|
</TouchableOpacity>
|
|
|
|
}
|
|
|
|
/>
|
2020-08-09 17:01:25 -04:00
|
|
|
</View>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-09 20:56:12 -04:00
|
|
|
class More extends React.Component {
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<NavigationContainer independent={true}>
|
|
|
|
<Stack.Navigator>
|
|
|
|
<Stack.Screen
|
|
|
|
name="Chooser"
|
|
|
|
component={MoreSwitch}
|
|
|
|
options={{
|
|
|
|
title:'More',
|
2020-08-09 21:27:58 -04:00
|
|
|
headerTitleStyle:styles.headerTitle,
|
|
|
|
headerStyle:{borderBottomWidth:0.5,borderBottomColor:'black'},
|
2020-08-09 20:56:12 -04:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name="announce"
|
|
|
|
component={Announcements}
|
|
|
|
options={{
|
|
|
|
title:'Announcements',
|
2020-08-09 21:27:58 -04:00
|
|
|
headerTitleStyle:[styles.headerTitle,{alignSelf:'center'}],
|
2020-08-10 16:06:01 -04:00
|
|
|
headerLeft:null,
|
2020-08-09 20:56:12 -04:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name="resources"
|
|
|
|
component={Resources}
|
|
|
|
options={{
|
|
|
|
title:'Resources',
|
2020-08-09 21:27:58 -04:00
|
|
|
headerTitleStyle:[styles.headerTitle,{alignSelf:'center'}],
|
|
|
|
headerLeft:null
|
2020-08-09 20:56:12 -04:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name="studentweek"
|
|
|
|
component={StudentWeek}
|
|
|
|
options={{
|
|
|
|
title:'Student of the Week',
|
2020-08-09 21:27:58 -04:00
|
|
|
headerTitleStyle:[styles.headerTitle,{alignSelf:'center'}],
|
|
|
|
headerLeft:null
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name="lunchevent"
|
|
|
|
component={LunchEvents}
|
|
|
|
options={{
|
|
|
|
title:'Lunch Events',
|
|
|
|
headerTitleStyle:[styles.headerTitle,{alignSelf:'center'}],
|
|
|
|
headerLeft:null
|
2020-08-09 20:56:12 -04:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name="sslops"
|
|
|
|
component={SSLOps}
|
|
|
|
options={{
|
|
|
|
title:'SSL Opportunities',
|
2020-08-09 21:27:58 -04:00
|
|
|
headerTitleStyle:[styles.headerTitle,{alignSelf:'center'}],
|
|
|
|
headerLeft:null
|
2020-08-09 20:56:12 -04:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</Stack.Navigator>
|
|
|
|
</NavigationContainer>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-09 17:01:25 -04:00
|
|
|
export default More;
|