Skip to content

refactor: use v4 api for member stats history #5144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import shortId from 'shortid';
import ChallengeTile from 'components/ChallengeTile';
import SRMTile from 'components/SRMTile';
import { actions } from 'topcoder-react-lib';
import { OLD_COMPETITION_TRACKS, COMPETITION_TRACKS } from 'utils/tc';
import LoadingIndicator from 'components/LoadingIndicator';
import GalleryModal from './GalleryModal';
import './style.scss';
Expand Down Expand Up @@ -104,6 +105,27 @@ const processPastChallenge = (challenge) => {
} else {
cloned.numImages = 0;
}

if (!cloned.type) {
cloned.type = cloned.subTrack;
}

switch (cloned.track) {
case OLD_COMPETITION_TRACKS.DATA_SCIENCE:
cloned.track = COMPETITION_TRACKS.DS;
break;
case OLD_COMPETITION_TRACKS.DESIGN:
cloned.track = COMPETITION_TRACKS.DES;
break;
case OLD_COMPETITION_TRACKS.DEVELOP:
cloned.track = COMPETITION_TRACKS.DEV;
break;
case OLD_COMPETITION_TRACKS.QA:
cloned.track = COMPETITION_TRACKS.QA;
break;
default:
break;
}
}
return cloned;
};
Expand Down Expand Up @@ -421,7 +443,6 @@ function mapDispatchToProps(dispatch) {
pageNum,
pageSize,
refresh,
userId,
) => {
const uuid = shortId();
dispatch(action.getSubtrackChallengesInit(handle, uuid));
Expand All @@ -434,7 +455,6 @@ function mapDispatchToProps(dispatch) {
pageNum,
pageSize,
refresh,
userId,
));
},
loadSRM: (handle, tokenV3, pageNum, pageSize, refresh) => {
Expand Down
1 change: 1 addition & 0 deletions src/shared/utils/tc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { config, isomorphy } from 'topcoder-react-utils';
import { tc } from 'topcoder-react-lib';

export const {
OLD_COMPETITION_TRACKS,
COMPETITION_TRACKS,
CHALLENGE_STATUS,
REVIEW_OPPORTUNITY_TYPES,
Expand Down