File tree Expand file tree Collapse file tree 4 files changed +15
-10
lines changed
challenge-listing/ChallengeCard/Status Expand file tree Collapse file tree 4 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import './IosCard.scss';
9
9
const IosCard = ( props ) => {
10
10
const { challenge } = props ;
11
11
const { legacy } = challenge ;
12
- const { track } = legacy ;
12
+ const { track, forumId } = legacy ;
13
13
return (
14
14
< div styleName = { `challenge tile-view ${ track } ` } >
15
15
< div styleName = "challenge-track" />
@@ -39,7 +39,7 @@ const IosCard = (props) => {
39
39
</ p >
40
40
</ a >
41
41
</ div >
42
- < a href = { `${ config . URL . FORUMS } /?module=Category&categoryID=${ challenge . forumId } ` } styleName = "forum" >
42
+ < a href = { `${ config . URL . FORUMS } /?module=Category&categoryID=${ forumId } ` } styleName = "forum" >
43
43
< div styleName = "forum-icon" />
44
44
< p >
45
45
Posts
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export default function ChallengeViewSelector(props) {
33
33
mySubmissions,
34
34
} = props ;
35
35
36
- const forumId = _ . get ( challenge , 'forumId' ) || 0 ;
36
+ const forumId = _ . get ( challenge , 'legacy. forumId' ) || 0 ;
37
37
const roles = _ . get ( challenge , 'userDetails.roles' ) || [ ] ;
38
38
39
39
const forumEndpoint = trackLower === 'design'
@@ -199,8 +199,8 @@ ChallengeViewSelector.propTypes = {
199
199
isLoggedIn : PT . bool ,
200
200
challenge : PT . shape ( {
201
201
subTrack : PT . any ,
202
- details : PT . shape ( {
203
- forumId : PT . number . isRequired ,
202
+ legacy : PT . shape ( {
203
+ forumId : PT . number ,
204
204
} ) ,
205
205
userDetails : PT . shape ( {
206
206
roles : PT . arrayOf ( PT . string ) ,
Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ export default function ChallengeDetailsView(props) {
38
38
} = props ;
39
39
40
40
const {
41
- forumId,
42
41
groups,
43
42
description,
44
43
privateDescription,
@@ -53,7 +52,12 @@ export default function ChallengeDetailsView(props) {
53
52
54
53
const tags = challenge . tags || [ ] ;
55
54
const roles = ( userDetails || { } ) . roles || [ ] ;
56
- const { track, reviewScorecardId, screeningScorecardId } = legacy ;
55
+ const {
56
+ track,
57
+ reviewScorecardId,
58
+ screeningScorecardId,
59
+ forumId,
60
+ } = legacy ;
57
61
58
62
const allowStockArt = _ . find ( metadata , { type : 'allowStockArt' } ) ;
59
63
let environment = '' ;
@@ -415,9 +419,9 @@ ChallengeDetailsView.propTypes = {
415
419
track : PT . string . isRequired ,
416
420
reviewScorecardId : PT . string ,
417
421
screeningScorecardId : PT . string ,
422
+ forumId : PT . number ,
418
423
} ) ,
419
424
groups : PT . any ,
420
- forumId : PT . number ,
421
425
reviewType : PT . string ,
422
426
tags : PT . arrayOf ( PT . string ) ,
423
427
numberOfCheckpointsPrizes : PT . number ,
Original file line number Diff line number Diff line change @@ -164,6 +164,7 @@ export default function ChallengeStatus(props) {
164
164
* the common code being used in both places. */
165
165
function completedChallenge ( ) {
166
166
const { challenge } = props ;
167
+ const forumId = _ . get ( challenge , 'legacy.forumId' ) || 0 ;
167
168
return (
168
169
< div >
169
170
{ renderLeaderboard ( ) }
@@ -191,7 +192,7 @@ export default function ChallengeStatus(props) {
191
192
challenge . myChallenge
192
193
&& (
193
194
< div styleName = "spacing" >
194
- < a styleName = "link-forum past" href = { `${ FORUM_URL } ${ challenge . forumId } ` } >
195
+ < a styleName = "link-forum past" href = { `${ FORUM_URL } ${ forumId } ` } >
195
196
< ForumIcon />
196
197
</ a >
197
198
</ div >
@@ -205,12 +206,12 @@ export default function ChallengeStatus(props) {
205
206
function activeChallenge ( ) {
206
207
const { challenge } = props ;
207
208
const {
208
- forumId,
209
209
myChallenge,
210
210
status,
211
211
subTrack,
212
212
} = challenge ;
213
213
const allPhases = challenge . phases || [ ] ;
214
+ const forumId = _ . get ( challenge , 'legacy.forumId' ) || 0 ;
214
215
215
216
let statusPhase = allPhases
216
217
. filter ( p => p . name !== 'Registration' && p . isOpen )
You can’t perform that action at this time.
0 commit comments