Commit db57e2c0 authored by Wietse Kuipers's avatar Wietse Kuipers
Browse files

Merge branch '39-open-event-card' into 'master'

Made event cards tappable

Closes #39

See merge request thalia/ThaliApp-react!113
parents 3ec72e92 bb1b3046
...@@ -33,7 +33,10 @@ const getInfo = (event) => { ...@@ -33,7 +33,10 @@ const getInfo = (event) => {
}; };
const EventDetailCard = props => ( const EventDetailCard = props => (
<View style={styles.card}> <TouchableOpacity
onPress={() => props.loadEvent(props.event.pk, props.token)}
style={styles.card}
>
<Text style={styles.eventTitle}>{props.event.title}</Text> <Text style={styles.eventTitle}>{props.event.title}</Text>
{getInfo(props.event)} {getInfo(props.event)}
<Text <Text
...@@ -41,12 +44,6 @@ const EventDetailCard = props => ( ...@@ -41,12 +44,6 @@ const EventDetailCard = props => (
style={styles.description} style={styles.description}
>{props.event.description}</Text> >{props.event.description}</Text>
<View style={styles.buttonList}> <View style={styles.buttonList}>
<TouchableOpacity
onPress={() => props.loadEvent(props.event.pk, props.token)}
style={styles.button}
>
<Text style={styles.moreInfo}>MEER INFO</Text>
</TouchableOpacity>
{props.event.pizza ? ( {props.event.pizza ? (
<TouchableOpacity <TouchableOpacity
onPress={() => props.retrievePizzaInfo(props.token)} onPress={() => props.retrievePizzaInfo(props.token)}
...@@ -64,7 +61,7 @@ const EventDetailCard = props => ( ...@@ -64,7 +61,7 @@ const EventDetailCard = props => (
/> />
) )
} }
</View> </TouchableOpacity>
); );
EventDetailCard.propTypes = { EventDetailCard.propTypes = {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment