Skip to content

Commit 76d7e93

Browse files
Merge pull request #5209 from topcoder-platform/tcx-202011
Smoke Testing 2020/11/24 - tcx-202011
2 parents 57bba81 + fdb5d50 commit 76d7e93

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ workflows:
259259
filters:
260260
branches:
261261
only:
262-
- mml-fix
262+
- develop
263263
# Production builds are exectuted
264264
# when PR is merged to the master
265265
# Don't change anything in this configuration

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

src/shared/components/challenge-detail/Header/index.jsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ export default function ChallengeHeader(props) {
8181
const sortedAllPhases = _.cloneDeep(allPhases)
8282
.sort((a, b) => moment(phaseEndDate(a)).diff(phaseEndDate(b)));
8383

84-
const { prizes } = prizeSets && prizeSets.length ? prizeSets[0] : [];
84+
const placementPrizes = _.find(prizeSets, { type: 'placement' });
85+
const { prizes } = placementPrizes || [];
8586

8687
const checkpointPrizes = _.find(prizeSets, { type: 'checkpoint' });
8788
let numberOfCheckpointsPrizes = 0;

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,9 @@ class ChallengeDetailPageContainer extends React.Component {
405405

406406
const { prizeSets } = challenge;
407407
let challengePrizes = [];
408-
if (prizeSets && prizeSets[0] && prizeSets[0].type === 'placement') {
409-
challengePrizes = prizeSets[0].prizes;
408+
const placementPrizes = _.find(prizeSets, { type: 'placement' });
409+
if (placementPrizes) {
410+
challengePrizes = placementPrizes.prizes;
410411
}
411412

412413
return (

src/shared/routes/Topcoder/Routes.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export default function Topcoder() {
8383
<Route
8484
component={Profile}
8585
exact
86-
path="/members/:handle([\w\-\[\].{}]{2,15})"
86+
path="/members/:handle([\w\-\[\].{} ]{2,15})"
8787
/>
8888
<Route
8989
component={() => <Settings base="/settings" />}
@@ -92,7 +92,7 @@ export default function Topcoder() {
9292
<Route
9393
component={ProfileStats}
9494
exact
95-
path="/members/:handle([\w\-\[\].{}]{2,15})/details"
95+
path="/members/:handle([\w\-\[\].{} ]{2,15})/details"
9696
/>
9797
{/* EDU Portal */}
9898
<Route

src/shared/utils/challenge-detail/helper.jsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,9 @@ export function getPrizePurseUI(
150150
* @param {Object} challenge challenge info
151151
*/
152152
export function getPrizePointsUI(challenge) {
153-
if (challenge.prizeSets && challenge.prizeSets.length > 0 && challenge.prizeSets[0].prizes) {
154-
const { prizes } = challenge.prizeSets[0];
153+
const placementPrizes = _.find(challenge.prizeSets, { type: 'placement' });
154+
if (placementPrizes) {
155+
const { prizes } = placementPrizes || [];
155156
return (
156157
<Prize
157158
label="Purse"

0 commit comments

Comments
 (0)