Skip to content

Commit 12d27f6

Browse files
Merge pull request #5182 from topcoder-platform/stats-history-v4
Smoke Testing 2020/11/10 - Stats history v4
2 parents 1ec116f + ce5c06f commit 12d27f6

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

package.json

+1-1
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": "1.1.1",
143+
"topcoder-react-lib": "1000.25.7",
144144
"topcoder-react-ui-kit": "2.0.1",
145145
"topcoder-react-utils": "0.7.8",
146146
"turndown": "^4.0.2",

src/shared/components/ProfilePage/Stats/SubTrackChallengeView/index.jsx

+22-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import shortId from 'shortid';
1313
import ChallengeTile from 'components/ChallengeTile';
1414
import SRMTile from 'components/SRMTile';
1515
import { actions } from 'topcoder-react-lib';
16+
import { OLD_COMPETITION_TRACKS, COMPETITION_TRACKS } from 'utils/tc';
1617
import LoadingIndicator from 'components/LoadingIndicator';
1718
import GalleryModal from './GalleryModal';
1819
import './style.scss';
@@ -104,6 +105,27 @@ const processPastChallenge = (challenge) => {
104105
} else {
105106
cloned.numImages = 0;
106107
}
108+
109+
if (!cloned.type) {
110+
cloned.type = cloned.subTrack;
111+
}
112+
113+
switch (cloned.track) {
114+
case OLD_COMPETITION_TRACKS.DATA_SCIENCE:
115+
cloned.track = COMPETITION_TRACKS.DS;
116+
break;
117+
case OLD_COMPETITION_TRACKS.DESIGN:
118+
cloned.track = COMPETITION_TRACKS.DES;
119+
break;
120+
case OLD_COMPETITION_TRACKS.DEVELOP:
121+
cloned.track = COMPETITION_TRACKS.DEV;
122+
break;
123+
case OLD_COMPETITION_TRACKS.QA:
124+
cloned.track = COMPETITION_TRACKS.QA;
125+
break;
126+
default:
127+
break;
128+
}
107129
}
108130
return cloned;
109131
};
@@ -421,7 +443,6 @@ function mapDispatchToProps(dispatch) {
421443
pageNum,
422444
pageSize,
423445
refresh,
424-
userId,
425446
) => {
426447
const uuid = shortId();
427448
dispatch(action.getSubtrackChallengesInit(handle, uuid));
@@ -434,7 +455,6 @@ function mapDispatchToProps(dispatch) {
434455
pageNum,
435456
pageSize,
436457
refresh,
437-
userId,
438458
));
439459
},
440460
loadSRM: (handle, tokenV3, pageNum, pageSize, refresh) => {

src/shared/utils/tc.js

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { config, isomorphy } from 'topcoder-react-utils';
1111
import { tc } from 'topcoder-react-lib';
1212

1313
export const {
14+
OLD_COMPETITION_TRACKS,
1415
COMPETITION_TRACKS,
1516
CHALLENGE_STATUS,
1617
REVIEW_OPPORTUNITY_TYPES,

0 commit comments

Comments
 (0)