@@ -9,35 +9,39 @@ const extractImageUrl = input => {
9
9
return matches ? matches [ 1 ] : '' ;
10
10
} ;
11
11
12
- const RowEvent = props => {
12
+ const RowEvent = ( {
13
+ link,
14
+ isMultiLine,
15
+ fluid,
16
+ description,
17
+ name,
18
+ venue,
19
+ time,
20
+ yesCount,
21
+ status,
22
+ } ) => {
13
23
return (
14
- < Card fluid = { props . fluid } raised centered target = "_blank" href = { props . link } >
15
- { props . description ? (
16
- < Image src = { extractImageUrl ( props . description ) } />
17
- ) : (
18
- < div />
19
- ) }
24
+ < Card fluid = { fluid } raised centered target = "_blank" href = { link } >
25
+ { description ? < Image src = { extractImageUrl ( description ) } /> : < div /> }
20
26
< Card . Content >
21
- < Card . Header > { props . name } </ Card . Header >
27
+ < Card . Header > { name } </ Card . Header >
22
28
< div className = "card_venue" >
23
- < Card . Meta >
24
- { props . venue === undefined ? 'Online' : props . venue . name }
25
- </ Card . Meta >
29
+ < Card . Meta > { venue === undefined ? 'Online' : venue . name } </ Card . Meta >
26
30
</ div >
27
31
</ Card . Content >
28
32
< Card . Content extra >
29
33
< span className = "card_icons" >
30
34
< Icon name = "clock" />
31
- { format ( props . time , "h:mm A, ddd MMM Do 'YY" ) }
35
+ { format ( time , "h:mm A, ddd MMM Do 'YY" ) }
32
36
</ span >
33
37
< span className = "card_icons" >
34
38
< Icon name = "users" />
35
- { props . yesCount }
36
- { props . status === 'upcoming' ? ' attending' : ' attended' }
39
+ { yesCount }
40
+ { status === 'upcoming' ? ' attending' : ' attended' }
37
41
</ span >
38
42
< span className = "card_icons" >
39
43
< Icon name = "log out" />
40
- { props . venue === undefined ? 'Free session' : 'Free entry' }
44
+ { venue === undefined ? 'Free session' : 'Free entry' }
41
45
</ span >
42
46
</ Card . Content >
43
47
< style jsx > { `
@@ -46,6 +50,8 @@ const RowEvent = props => {
46
50
}
47
51
.card_icons {
48
52
margin-right: 15px;
53
+ display: ${ isMultiLine ? 'block' : null } ;
54
+ text-align: left;
49
55
}
50
56
@media (max-width: 700px) {
51
57
.card_icons {
0 commit comments