Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Commit 1f2dda0

Browse files
committed
refactor(props): added status prop to row-events component to determine attendance terminology
1 parent 2f6dc30 commit 1f2dda0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

components/row-events.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const RowEvent = props => {
2121
<span className="card_icons">
2222
<Icon name="users" />
2323
{props.yesCount}
24-
{moment(props.time).isAfter() ? ' attending' : ' attended'}
24+
{props.status === 'upcoming' ? ' attending' : ' attended'}
2525
</span>
2626
<span className="card_icons">
2727
<Icon name="log out" />

pages/events.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export default publicPage(
5353
time={event.time}
5454
venue={event.venue}
5555
link={event.link}
56+
status={event.status}
5657
/>
5758
</Card.Group>
5859
))}
@@ -68,6 +69,7 @@ export default publicPage(
6869
time={event.time}
6970
venue={event.venue}
7071
link={event.link}
72+
status={event.status}
7173
/>
7274
</Card.Group>
7375
))}

0 commit comments

Comments
 (0)