diff --git a/.circleci/config.yml b/.circleci/config.yml
index 4a590c1e08..0bb2747b75 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -230,6 +230,7 @@ workflows:
filters:
branches:
only:
+ - milestone-20200924
- develop
# This is alternate dev env for parallel testing
- "build-test":
diff --git a/__tests__/shared/components/Header/__snapshots__/index.jsx.snap b/__tests__/shared/components/Header/__snapshots__/index.jsx.snap
index 9f0f7a4186..5e384a6d98 100644
--- a/__tests__/shared/components/Header/__snapshots__/index.jsx.snap
+++ b/__tests__/shared/components/Header/__snapshots__/index.jsx.snap
@@ -118,6 +118,7 @@ exports[`Default render 1`] = `
},
Object {
"href": "https://www.topcoder-dev.com/blog",
+ "openNewTab": true,
"title": "Blog",
},
Object {
diff --git a/__tests__/shared/components/ProfilePage/__snapshots__/index.jsx.snap b/__tests__/shared/components/ProfilePage/__snapshots__/index.jsx.snap
index fb48f813bb..3f8045b9fa 100644
--- a/__tests__/shared/components/ProfilePage/__snapshots__/index.jsx.snap
+++ b/__tests__/shared/components/ProfilePage/__snapshots__/index.jsx.snap
@@ -58,7 +58,7 @@ exports[`renders a full Profile correctly 1`] = `
}
onShowBadges={[Function]}
showBadgesButton={true}
- wins={3}
+ wins={0}
/>
diff --git a/config/default.js b/config/default.js
index 7b9001cd62..ced7a37508 100644
--- a/config/default.js
+++ b/config/default.js
@@ -370,6 +370,7 @@ module.exports = {
{
title: 'Blog',
href: 'https://www.topcoder-dev.com/blog',
+ openNewTab: true,
},
{
title: 'Thrive',
diff --git a/config/production.js b/config/production.js
index d62be0f17d..405c90e93b 100644
--- a/config/production.js
+++ b/config/production.js
@@ -171,6 +171,7 @@ module.exports = {
{
title: 'Blog',
href: 'https://www.topcoder.com/blog',
+ openNewTab: true,
},
{
title: 'Thrive',
diff --git a/package.json b/package.json
index f6f6c702b7..262de4c667 100644
--- a/package.json
+++ b/package.json
@@ -138,7 +138,7 @@
"tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3",
"tc-ui": "^1.0.12",
"topcoder-react-lib": "1000.22.7",
- "topcoder-react-ui-kit": "2.0.0",
+ "topcoder-react-ui-kit": "1000.1.0",
"topcoder-react-utils": "0.7.8",
"turndown": "^4.0.2",
"url-parse": "^1.4.1",
diff --git a/src/shared/components/ProfilePage/index.jsx b/src/shared/components/ProfilePage/index.jsx
index 92195ee203..74181a61ca 100644
--- a/src/shared/components/ProfilePage/index.jsx
+++ b/src/shared/components/ProfilePage/index.jsx
@@ -192,7 +192,7 @@ class ProfilePage extends React.Component {
info={info}
onShowBadges={() => this.setState({ badgesModalOpen: true })}
showBadgesButton={achievements && achievements.length > 0}
- wins={_.get(stats, 'wins', 0)}
+ wins={_.get((stats && stats[0]) || {}, 'wins', 0)}
/>
diff --git a/src/shared/components/challenge-listing/Tooltips/ProgressBarTooltip/index.jsx b/src/shared/components/challenge-listing/Tooltips/ProgressBarTooltip/index.jsx
index 432afcde8b..65aac9c5f9 100644
--- a/src/shared/components/challenge-listing/Tooltips/ProgressBarTooltip/index.jsx
+++ b/src/shared/components/challenge-listing/Tooltips/ProgressBarTooltip/index.jsx
@@ -97,17 +97,17 @@ function Tip(props) {
const allPhases = c.phases || [];
const endPhaseDate = Math.max(...allPhases.map(d => phaseEndDate(d)));
- const registrationPhase = allPhases.find(phase => phase.name === 'Registration');
- const submissionPhase = allPhases.find(phase => phase.name === 'Submission');
- const checkpointPhase = allPhases.find(phase => phase.name === 'Checkpoint Submission');
+ const registrationPhase = allPhases.find(phase => phase.name === 'Registration') || {};
+ const submissionPhase = allPhases.find(phase => phase.name === 'Submission') || {};
+ const checkpointPhase = allPhases.find(phase => phase.name === 'Checkpoint Submission') || {};
- if (registrationPhase) {
+ if (!_.isEmpty(registrationPhase)) {
steps.push({
date: phaseStartDate(registrationPhase),
name: 'Start',
});
}
- if (checkpointPhase) {
+ if (!_.isEmpty(checkpointPhase)) {
steps.push({
date: phaseEndDate(checkpointPhase),
name: 'Checkpoint',
@@ -119,7 +119,7 @@ function Tip(props) {
date: phaseEndDate(iterativeReviewPhase),
name: 'Iterative Review',
});
- } else if (submissionPhase) {
+ } else if (!_.isEmpty(submissionPhase)) {
steps.push({
date: phaseEndDate(submissionPhase),
name: 'Submission',
diff --git a/src/shared/routes/index.jsx b/src/shared/routes/index.jsx
index be51690503..0f1b026e2b 100644
--- a/src/shared/routes/index.jsx
+++ b/src/shared/routes/index.jsx
@@ -95,6 +95,10 @@ function Routes({ communityId }) {
component={() => }
path="/community/(competitive-programming|data-science|design|development|qa)/how-to-compete"
/>
+
{
// extract the phases from `challenge.phases`,
// as `challenge.registrationStartDate` returned from API is not reliable
- const registrationPhase = find(challenge.phases, p => p.name === 'Registration');
- const submissionPhase = find(challenge.phases, p => p.name === 'Submission');
+ const registrationPhase = find(challenge.phases, p => p.name === 'Registration') || {};
+ const submissionPhase = find(challenge.phases, p => p.name === 'Submission') || {};
// registration phase exists
- if (registrationPhase) {
+ if (!isEmpty(registrationPhase)) {
return moment(phaseStartDate(registrationPhase));
}
// registration phase doesnt exist, This is possibly a F2F or TSK. Take submission phase