This repository was archived by the owner on Mar 9, 2021. It is now read-only.
File tree 2 files changed +18
-16
lines changed
2 files changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -9,35 +9,38 @@ const extractImageUrl = input => {
9
9
return matches ? matches [ 1 ] : '' ;
10
10
} ;
11
11
12
- const RowEvent = props => {
12
+ const RowEvent = ( {
13
+ link,
14
+ fluid,
15
+ description,
16
+ name,
17
+ venue,
18
+ time,
19
+ yesCount,
20
+ status,
21
+ } ) => {
13
22
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
- ) }
23
+ < Card fluid = { fluid } raised centered target = "_blank" href = { link } >
24
+ { description ? < Image src = { extractImageUrl ( description ) } /> : < div /> }
20
25
< Card . Content >
21
- < Card . Header > { props . name } </ Card . Header >
26
+ < Card . Header > { name } </ Card . Header >
22
27
< div className = "card_venue" >
23
- < Card . Meta >
24
- { props . venue === undefined ? 'Online' : props . venue . name }
25
- </ Card . Meta >
28
+ < Card . Meta > { venue === undefined ? 'Online' : venue . name } </ Card . Meta >
26
29
</ div >
27
30
</ Card . Content >
28
31
< Card . Content extra >
29
32
< span className = "card_icons" >
30
33
< Icon name = "clock" />
31
- { format ( props . time , "h:mm A, ddd MMM Do 'YY" ) }
34
+ { format ( time , "h:mm A, ddd MMM Do 'YY" ) }
32
35
</ span >
33
36
< span className = "card_icons" >
34
37
< Icon name = "users" />
35
- { props . yesCount }
36
- { props . status === 'upcoming' ? ' attending' : ' attended' }
38
+ { yesCount }
39
+ { status === 'upcoming' ? ' attending' : ' attended' }
37
40
</ span >
38
41
< span className = "card_icons" >
39
42
< Icon name = "log out" />
40
- { props . venue === undefined ? 'Free session' : 'Free entry' }
43
+ { venue === undefined ? 'Free session' : 'Free entry' }
41
44
</ span >
42
45
</ Card . Content >
43
46
< style jsx > { `
Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ class Events extends React.Component {
45
45
}
46
46
}
47
47
renderEvents ( ) {
48
- console . log ( 'this.state' , this . state ) ;
49
48
if ( this . state . fetchError ) {
50
49
return < div > { this . state . fetchError } </ div > ;
51
50
}
You can’t perform that action at this time.
0 commit comments