put polls page into more stack navigator

This commit is contained in:
Emily Liu 2020-12-23 00:30:14 -05:00
parent f216cfb872
commit 0bf2629664
4 changed files with 12 additions and 10 deletions

View File

@ -77,7 +77,6 @@ class App extends React.Component {
> >
<Tab.Screen name="Home" component={Home}/> <Tab.Screen name="Home" component={Home}/>
<Tab.Screen name="Calendar" component={Calendar} /> <Tab.Screen name="Calendar" component={Calendar} />
<Tab.Screen name="Polls" component={Poll} />
<Tab.Screen name="Clubs" component={Clubs} options ={{title: 'Clubs'}}/> <Tab.Screen name="Clubs" component={Clubs} options ={{title: 'Clubs'}}/>
<Tab.Screen name="Staff" component={Staff} /> <Tab.Screen name="Staff" component={Staff} />
<Tab.Screen name="More" component={More} /> <Tab.Screen name="More" component={More} />

View File

@ -28,6 +28,7 @@ const Images = {
student:require('./assets/student.png'), student:require('./assets/student.png'),
announcements:require('./assets/announcements.png'), announcements:require('./assets/announcements.png'),
resources:require('./assets/resources.png'), resources:require('./assets/resources.png'),
polls:require('./assets/polls.png'),
} }
export default Images; export default Images;

View File

@ -53,6 +53,7 @@ class MoreSwitch extends React.Component {
{name:"Lunch Events",key:"lunchevent", img:Images.lunch}, {name:"Lunch Events",key:"lunchevent", img:Images.lunch},
{name:"SSL Opportunities",key:"sslopps", img:Images.sslopps}, {name:"SSL Opportunities",key:"sslopps", img:Images.sslopps},
{name:"Challenge of the Week",key:"challengeweek", img:Images.challenge}, {name:"Challenge of the Week",key:"challengeweek", img:Images.challenge},
{name:"Polls", key:"polls", img: Images.polls},
{name:"Settings", key:"settings", img: Images.settings}, {name:"Settings", key:"settings", img: Images.settings},
]} ]}
renderItem={({item})=> renderItem={({item})=>
@ -147,6 +148,16 @@ class More extends React.Component {
headerBackground: ()=>background headerBackground: ()=>background
}} }}
/> />
<Stack.Screen
name="polls"
component={Poll}
options={{
title:'Polls',
headerTitleStyle:[styles.headerTitle,{alignSelf:'center'}],
headerLeft:null,
headerBackground: ()=>background
}}
/>
<Stack.Screen <Stack.Screen
name="settings" name="settings"
component={Settings} component={Settings}

View File

@ -50,15 +50,6 @@ componentDidMount() {
render() { render() {
return ( return (
<View style = {{backgroundColor: 'white'}}> <View style = {{backgroundColor: 'white'}}>
<View style = {{height: 90, display: 'flex'}}>
<LinearGradient
colors={['#f99', 'white']}
style = {{height: '100%', borderBottomColor:'black', borderBottomWidth:0.5, display: 'flex', justifyContent: 'flex-end', paddingBottom: '2.5%'}}
>
<Text style = {{fontSize: 24, fontWeight: 'bold', alignSelf: 'center'}}>Polls</Text>
</LinearGradient>
</View>
<View style={{backgroundColor: 'white', height: '100%', display: 'flex', alignItems: 'center'}}> <View style={{backgroundColor: 'white', height: '100%', display: 'flex', alignItems: 'center'}}>
<TouchableOpacity onPress={()=>Linking.openURL("https://google.com")}> <TouchableOpacity onPress={()=>Linking.openURL("https://google.com")}>
<Image source={require('./assets/polls.png')} style={{marginTop: 50, height: 300, width: 300, tintColor: 'red'}}/> <Image source={require('./assets/polls.png')} style={{marginTop: 50, height: 300, width: 300, tintColor: 'red'}}/>