Skip to content

Commit 8a64069

Browse files
authored
Merge pull request #4534 from nursoltan-s/iss-4517
Fix error on registration page
2 parents 169efff + d1ce6ae commit 8a64069

File tree

1 file changed

+6
-4
lines changed
  • src/shared/components/challenge-detail/Registrants

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,16 +239,18 @@ export default class Registrants extends React.Component {
239239
onSortChange,
240240
} = this.props;
241241
const {
242-
prizes,
242+
prizeSets,
243243
legacy,
244244
} = challenge;
245245
const { track } = legacy;
246246
const { sortedRegistrants } = this.state;
247247
const { field, sort } = this.getRegistrantsSortParam();
248248
const revertSort = (sort === 'desc') ? 'asc' : 'desc';
249249
const isDesign = track.toLowerCase() === 'design';
250-
const isF2F = challenge.subTrack.indexOf('FIRST_2_FINISH') > -1;
251-
const isBugHunt = challenge.subTrack.indexOf('BUG_HUNT') > -1;
250+
const isF2F = track.indexOf('FIRST_2_FINISH') > -1;
251+
const isBugHunt = track.indexOf('BUG_HUNT') > -1;
252+
const placementPrizes = _.find(prizeSets, { type: 'placement' });
253+
const { prizes } = placementPrizes || [];
252254

253255
const checkpoints = challenge.checkpoints || [];
254256

@@ -491,7 +493,7 @@ Registrants.propTypes = {
491493
track: PT.any,
492494
}),
493495
subTrack: PT.any,
494-
prizes: PT.arrayOf(PT.number).isRequired,
496+
prizeSets: PT.arrayOf(PT.shape()).isRequired,
495497
registrants: PT.arrayOf(PT.shape()).isRequired,
496498
round1Introduction: PT.string,
497499
round2Introduction: PT.string,

0 commit comments

Comments
 (0)