@@ -38,6 +38,7 @@ import {
38
38
COMPETITION_TRACKS ,
39
39
COMPETITION_TRACKS_V3 ,
40
40
SUBTRACKS ,
41
+ CHALLENGE_STATUS ,
41
42
} from 'utils/tc' ;
42
43
import { config , MetaTags } from 'topcoder-react-utils' ;
43
44
import { actions } from 'topcoder-react-lib' ;
@@ -406,7 +407,7 @@ class ChallengeDetailPageContainer extends React.Component {
406
407
}
407
408
408
409
409
- const submissionEnded = status === ' COMPLETED'
410
+ const submissionEnded = status === CHALLENGE_STATUS . COMPLETED
410
411
|| ( ! _ . some ( phases , { name : 'Submission' , isOpen : true } )
411
412
&& ! _ . some ( phases , { name : 'Checkpoint Submission' , isOpen : true } ) ) ;
412
413
@@ -849,9 +850,9 @@ const mapDispatchToProps = (dispatch) => {
849
850
dispatch ( a . fetchCheckpointsDone ( tokens . tokenV2 , ch . legacyId ) ) ;
850
851
} else dispatch ( a . dropCheckpoints ( ) ) ;
851
852
} else dispatch ( a . dropCheckpoints ( ) ) ;
852
- if ( ch . status === ' COMPLETED' ) {
853
- dispatch ( a . loadResultsInit ( challengeId ) ) ;
854
- dispatch ( a . loadResultsDone ( tokens , challengeId , ch . track . toLowerCase ( ) ) ) ;
853
+ if ( ch . status === CHALLENGE_STATUS . COMPLETED ) {
854
+ dispatch ( a . loadResultsInit ( ch . legacyId ) ) ;
855
+ dispatch ( a . loadResultsDone ( tokens , ch . legacyId , ch . track . toLowerCase ( ) ) ) ;
855
856
} else dispatch ( a . dropResults ( ) ) ;
856
857
return res ;
857
858
} ) ;
0 commit comments