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

Commit cfd6461

Browse files
committed
Conditionally render city/state/country
Don't display those properties if they are falsey
1 parent 54af5e6 commit cfd6461

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/scenes/home/jobs/featuredJob/featuredJob.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ const FeaturedJob = ({
2929
</div>
3030
<div className={styles.detailsContainer}>
3131
<FontAwesomeIcon icon={faMapMarkerAlt} size="sm" style={{ color: '#afafaf' }} />
32-
<span className={styles.detail}>{city},</span>
33-
<span className={styles.detail}>{state},</span>
34-
<span className={styles.detail}>{country}</span>
32+
{city && <span className={styles.detail}>{city},</span>}
33+
{state && <span className={styles.detail}>{state},</span>}
34+
{country && <span className={styles.detail}>{country}</span>}
3535
</div>
3636
{remote &&
3737
<div className={styles.detailsContainer}>

0 commit comments

Comments
 (0)