Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
ThaliApp
Commits
7166c451
Commit
7166c451
authored
Dec 20, 2017
by
Jen Dusseljee
Browse files
Made event cards tappable
parent
01bc7787
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/components/EventDetailCard.js
View file @
7166c451
...
...
@@ -33,38 +33,42 @@ const getInfo = (event) => {
};
const
EventDetailCard
=
props
=>
(
<
View
style
=
{
styles
.
card
}
>
<
Text
style
=
{
styles
.
eventTitle
}
>
{
props
.
event
.
title
}
<
/Text
>
{
getInfo
(
props
.
event
)}
<
Text
numberOfLines
=
{
2
}
style
=
{
styles
.
description
}
>
{
props
.
event
.
description
}
<
/Text
>
<
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
?
(
<
TouchableOpacity
onPress
=
{()
=>
props
.
loadEvent
(
props
.
event
.
pk
,
props
.
token
)}
>
<
View
style
=
{
styles
.
card
}
>
<
Text
style
=
{
styles
.
eventTitle
}
>
{
props
.
event
.
title
}
<
/Text
>
{
getInfo
(
props
.
event
)}
<
Text
numberOfLines
=
{
2
}
style
=
{
styles
.
description
}
>
{
props
.
event
.
description
}
<
/Text
>
<
View
style
=
{
styles
.
buttonList
}
>
<
TouchableOpacity
onPress
=
{()
=>
props
.
retrievePizzaInfo
(
props
.
token
)}
onPress
=
{()
=>
props
.
loadEvent
(
props
.
event
.
pk
,
props
.
token
)}
style
=
{
styles
.
button
}
>
<
Text
style
=
{
styles
.
or
derPizza
}
>
PIZZA
<
/Text
>
<
Text
style
=
{
styles
.
m
or
eInfo
}
>
MEER
INFO
<
/Text
>
<
/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
>
{
props
.
event
.
registered
===
null
?
null
:
(
<
View
style
=
{[
styles
.
indicator
,
props
.
event
.
registered
?
styles
.
registered
:
styles
.
unregistered
]}
/
>
)
}
<
/View
>
<
/TouchableOpacity
>
);
EventDetailCard
.
propTypes
=
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment