diff --git a/package.json b/package.json index 2f459e3c1c..7c2fb734d9 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "supertest": "^3.1.0", "tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3", "tc-ui": "^1.0.12", - "topcoder-react-lib": "1000.23.2", + "topcoder-react-lib": "1000.23.3", "topcoder-react-ui-kit": "2.0.1", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", diff --git a/src/shared/containers/challenge-detail/index.jsx b/src/shared/containers/challenge-detail/index.jsx index 1dc074aee0..3c2efdf568 100644 --- a/src/shared/containers/challenge-detail/index.jsx +++ b/src/shared/containers/challenge-detail/index.jsx @@ -38,6 +38,7 @@ import { COMPETITION_TRACKS, COMPETITION_TRACKS_V3, SUBTRACKS, + CHALLENGE_STATUS, } from 'utils/tc'; import { config, MetaTags } from 'topcoder-react-utils'; import { actions } from 'topcoder-react-lib'; @@ -406,7 +407,7 @@ class ChallengeDetailPageContainer extends React.Component { } - const submissionEnded = status === 'COMPLETED' + const submissionEnded = status === CHALLENGE_STATUS.COMPLETED || (!_.some(phases, { name: 'Submission', isOpen: true }) && !_.some(phases, { name: 'Checkpoint Submission', isOpen: true })); @@ -849,9 +850,9 @@ const mapDispatchToProps = (dispatch) => { dispatch(a.fetchCheckpointsDone(tokens.tokenV2, ch.legacyId)); } else dispatch(a.dropCheckpoints()); } else dispatch(a.dropCheckpoints()); - if (ch.status === 'COMPLETED') { - dispatch(a.loadResultsInit(challengeId)); - dispatch(a.loadResultsDone(tokens, challengeId, ch.track.toLowerCase())); + if (ch.status === CHALLENGE_STATUS.COMPLETED) { + dispatch(a.loadResultsInit(ch.legacyId)); + dispatch(a.loadResultsDone(tokens, ch.legacyId, ch.track.toLowerCase())); } else dispatch(a.dropResults()); return res; });