Commit 7166c451 authored by Jen Dusseljee's avatar Jen Dusseljee
Browse files

Made event cards tappable

parent 01bc7787
...@@ -33,38 +33,42 @@ const getInfo = (event) => { ...@@ -33,38 +33,42 @@ const getInfo = (event) => {
}; };
const EventDetailCard = props => ( const EventDetailCard = props => (
<View style={styles.card}> <TouchableOpacity
<Text style={styles.eventTitle}>{props.event.title}</Text> onPress={() => props.loadEvent(props.event.pk, props.token)}
{getInfo(props.event)} >
<Text <View style={styles.card}>
numberOfLines={2} <Text style={styles.eventTitle}>{props.event.title}</Text>
style={styles.description} {getInfo(props.event)}
>{props.event.description}</Text> <Text
<View style={styles.buttonList}> numberOfLines={2}
<TouchableOpacity style={styles.description}
onPress={() => props.loadEvent(props.event.pk, props.token)} >{props.event.description}</Text>
style={styles.button} <View style={styles.buttonList}>
>
<Text style={styles.moreInfo}>MEER INFO</Text>
</TouchableOpacity>
{props.event.pizza ? (
<TouchableOpacity <TouchableOpacity
onPress={() => props.retrievePizzaInfo(props.token)} onPress={() => props.loadEvent(props.event.pk, props.token)}
style={styles.button} style={styles.button}
> >
<Text style={styles.orderPizza}>PIZZA</Text> <Text style={styles.moreInfo}>MEER INFO</Text>
</TouchableOpacity> </TouchableOpacity>
) : null} {props.event.pizza ? (
<TouchableOpacity
onPress={() => props.retrievePizzaInfo(props.token)}
style={styles.button}
>
<Text style={styles.orderPizza}>PIZZA</Text>
</TouchableOpacity>
) : null}
</View>
{props.event.registered === null ? null : (
<View
style={[
styles.indicator,
props.event.registered ? styles.registered : styles.unregistered]}
/>
)
}
</View> </View>
{props.event.registered === null ? null : ( </TouchableOpacity>
<View
style={[
styles.indicator,
props.event.registered ? styles.registered : styles.unregistered]}
/>
)
}
</View>
); );
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