@@ -156,7 +156,7 @@ class ChallengeCard extends React.Component {
156
156
157
157
render ( ) {
158
158
const { isLaunch, isConfirm, isSaving } = this . state
159
- const { challenge } = this . props
159
+ const { challenge, shouldShowCurrentPhase } = this . props
160
160
const { phaseMessage, endTime } = getPhaseInfo ( challenge )
161
161
const communityAppUrl = `${ COMMUNITY_APP_URL } /challenges/${ challenge . legacyId } `
162
162
return (
@@ -203,10 +203,10 @@ class ChallengeCard extends React.Component {
203
203
< a className = { styles . col2 } href = { communityAppUrl } >
204
204
{ renderStatus ( challenge . status . toUpperCase ( ) ) }
205
205
</ a >
206
- < a className = { styles . col3 } href = { communityAppUrl } >
206
+ { shouldShowCurrentPhase && ( < a className = { styles . col3 } href = { communityAppUrl } >
207
207
< span className = { styles . block } > { phaseMessage } </ span >
208
208
< span className = 'block light-text' > { endTime } </ span >
209
- </ a >
209
+ </ a > ) }
210
210
< div className = { cn ( styles . col4 , styles . editingContainer ) } >
211
211
{ hoverComponents ( challenge , this . onUpdateLaunch ) }
212
212
</ div >
@@ -225,8 +225,13 @@ class ChallengeCard extends React.Component {
225
225
}
226
226
}
227
227
228
+ ChallengeCard . defaultPrps = {
229
+ shouldShowCurrentPhase : true
230
+ }
231
+
228
232
ChallengeCard . propTypes = {
229
- challenge : PropTypes . object
233
+ challenge : PropTypes . object ,
234
+ shouldShowCurrentPhase : PropTypes . bool
230
235
}
231
236
232
237
export default withRouter ( ChallengeCard )
0 commit comments