Skip to content
This repository was archived by the owner on Aug 8, 2019. It is now read-only.

Commit 225c138

Browse files
author
condef5
committed
Hide the distance in favorite clubs
1 parent 2d68c13 commit 225c138

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

client/src/components/club.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,14 @@ function Club({ club }) {
7575
>
7676
{club.favorited_count > 0 && club.favorited_count}
7777
</span>
78-
<MapPin width="18px" height="18px" css={styleMapPin} />
79-
<span>
80-
{club.distance !== 0 ? `${club.distance / 1000.0}km` : null}
81-
</span>
78+
{club.distance && (
79+
<>
80+
<MapPin width="18px" height="18px" css={styleMapPin} />
81+
<span>
82+
{club.distance !== 0 ? `${club.distance / 1000.0}km` : null}
83+
</span>
84+
</>
85+
)}
8286
</div>
8387
</div>
8488
</Card>

0 commit comments

Comments
 (0)