File tree Expand file tree Collapse file tree 2 files changed +20
-13
lines changed
src/shared/components/challenge-listing Expand file tree Collapse file tree 2 files changed +20
-13
lines changed Original file line number Diff line number Diff line change @@ -91,12 +91,15 @@ function ChallengeCard({
91
91
{ challenge . status === 'Active' ? 'Ends ' : 'Ended ' }
92
92
{ getEndDate ( challenge , challengeTypes ) }
93
93
</ span >
94
- < Tags
95
- tags = { challenge . tags }
96
- onTechTagClicked = { onTechTagClicked }
97
- isExpanded = { expandedTags . includes ( challenge . id ) }
98
- expand = { ( ) => expandTag ( challenge . id ) }
99
- />
94
+ { challenge . tags . length > 0
95
+ && (
96
+ < Tags
97
+ tags = { challenge . tags }
98
+ onTechTagClicked = { onTechTagClicked }
99
+ isExpanded = { expandedTags . includes ( challenge . id ) }
100
+ expand = { ( ) => expandTag ( challenge . id ) }
101
+ />
102
+ ) }
100
103
</ div >
101
104
</ div >
102
105
</ div >
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ function ReviewOpportunityCard({
48
48
} ) {
49
49
const { challenge } = opportunity ;
50
50
const { subTrack, legacy } = challenge ;
51
- const tags = challenge . tags || challenge . technologies ;
51
+ let tags = challenge . tags || challenge . technologies ;
52
+ tags = tags . filter ( tag => tag . trim ( ) . length ) ;
52
53
const track = legacy ? legacy . track : challenge . track ;
53
54
const start = moment ( opportunity . startDate ) ;
54
55
return (
@@ -80,12 +81,15 @@ function ReviewOpportunityCard({
80
81
{ ' ' }
81
82
{ start . format ( 'MMM DD' ) }
82
83
</ span >
83
- < Tags
84
- tags = { tags }
85
- isExpanded = { ( expandedTags || [ ] ) . includes ( challenge . id ) }
86
- expand = { ( ) => expandTag ( challenge . id ) }
87
- onTechTagClicked = { onTechTagClicked }
88
- />
84
+ { tags . length > 0
85
+ && (
86
+ < Tags
87
+ tags = { tags }
88
+ isExpanded = { ( expandedTags || [ ] ) . includes ( challenge . id ) }
89
+ expand = { ( ) => expandTag ( challenge . id ) }
90
+ onTechTagClicked = { onTechTagClicked }
91
+ />
92
+ ) }
89
93
</ div >
90
94
</ div >
91
95
</ div >
You can’t perform that action at this time.
0 commit comments