Skip to content

Commit 185d342

Browse files
committed
Hotfix: Update old challenge.lagacy.track with challenge.track
Also update topcoder-react-lib -> 1000.19.48
1 parent 1cfe4c6 commit 185d342

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
"tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev",
137137
"tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3",
138138
"tc-ui": "^1.0.12",
139-
"topcoder-react-lib": "1000.19.47",
139+
"topcoder-react-lib": "1000.19.48",
140140
"topcoder-react-ui-kit": "1000.0.4",
141141
"topcoder-react-utils": "0.7.8",
142142
"turndown": "^4.0.2",

src/shared/containers/SubmissionPage.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ const mapStateToProps = (state, ownProps) => {
174174
challengesUrl: ownProps.challengesUrl,
175175
tokenV2: state.auth.tokenV2,
176176
tokenV3: state.auth.tokenV3,
177-
track: details.legacy ? details.legacy.track : '',
177+
track: details.track,
178178
challenge: state.challenge,
179179
status: details.status,
180180
isRegistered: details.isRegistered,

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

+4-5
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,8 @@ class ChallengeDetailPageContainer extends React.Component {
243243
reloadChallengeDetails(nextProps.auth, challengeId);
244244
}
245245

246-
const { legacy } = nextProps.challenge;
247-
const track = legacy ? legacy.track : nextProps.challenge.track;
248-
if (track && track.toLowerCase() !== 'design' && thriveArticles.length === 0) {
246+
const { track } = nextProps.challenge;
247+
if (track === COMPETITION_TRACKS.DESIGN && thriveArticles.length === 0) {
249248
// filter all tags with value 'Other'
250249
const tags = _.filter(nextProps.challenge.tags, tag => tag !== 'Other');
251250
if (tags.length > 0) {
@@ -845,7 +844,7 @@ const mapDispatchToProps = (dispatch) => {
845844
dispatch(a.getDetailsDone(challengeId, tokens.tokenV3, tokens.tokenV2))
846845
.then((res) => {
847846
const ch = res.payload;
848-
if (ch.legacy.track === COMPETITION_TRACKS.DESIGN) {
847+
if (ch.track === COMPETITION_TRACKS.DESIGN) {
849848
const p = ch.phases || []
850849
.filter(x => x.name === 'Checkpoint Review');
851850
if (p.length && !p[0].isOpen) {
@@ -869,7 +868,7 @@ const mapDispatchToProps = (dispatch) => {
869868
const a = actions.challenge;
870869
dispatch(a.getDetailsDone(challengeId, tokens.tokenV3, tokens.tokenV2))
871870
.then((challengeDetails) => {
872-
if (challengeDetails.legacy.track === COMPETITION_TRACKS.DESIGN) {
871+
if (challengeDetails.track === COMPETITION_TRACKS.DESIGN) {
873872
const p = challengeDetails.phases || []
874873
.filter(x => x.name === 'Checkpoint Review');
875874
if (p.length && !p[0].isOpen) {

0 commit comments

Comments
 (0)