Skip to content

Commit 6ff2a97

Browse files
Merge pull request #5134 from topcoder-platform/issue-5121
Pass legacyid to v2 results call
2 parents e3d3b6c + a4a78d0 commit 6ff2a97

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"supertest": "^3.1.0",
141141
"tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3",
142142
"tc-ui": "^1.0.12",
143-
"topcoder-react-lib": "1000.23.2",
143+
"topcoder-react-lib": "1000.23.3",
144144
"topcoder-react-ui-kit": "2.0.1",
145145
"topcoder-react-utils": "0.7.8",
146146
"turndown": "^4.0.2",

src/shared/containers/challenge-detail/index.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import {
3838
COMPETITION_TRACKS,
3939
COMPETITION_TRACKS_V3,
4040
SUBTRACKS,
41+
CHALLENGE_STATUS,
4142
} from 'utils/tc';
4243
import { config, MetaTags } from 'topcoder-react-utils';
4344
import { actions } from 'topcoder-react-lib';
@@ -406,7 +407,7 @@ class ChallengeDetailPageContainer extends React.Component {
406407
}
407408

408409

409-
const submissionEnded = status === 'COMPLETED'
410+
const submissionEnded = status === CHALLENGE_STATUS.COMPLETED
410411
|| (!_.some(phases, { name: 'Submission', isOpen: true })
411412
&& !_.some(phases, { name: 'Checkpoint Submission', isOpen: true }));
412413

@@ -849,9 +850,9 @@ const mapDispatchToProps = (dispatch) => {
849850
dispatch(a.fetchCheckpointsDone(tokens.tokenV2, ch.legacyId));
850851
} else dispatch(a.dropCheckpoints());
851852
} 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()));
855856
} else dispatch(a.dropResults());
856857
return res;
857858
});

0 commit comments

Comments
 (0)