File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,6 @@ export default function ChallengeHeader(props) {
66
66
events,
67
67
legacy,
68
68
prizeSets,
69
- numberOfCheckpointsPrizes,
70
- topCheckPointPrize,
71
69
reliabilityBonus,
72
70
userDetails,
73
71
numRegistrants,
@@ -83,6 +81,14 @@ export default function ChallengeHeader(props) {
83
81
const { prizes } = prizeSets && prizeSets . length ? prizeSets [ 0 ] : [ ] ;
84
82
const status = allPhases . length ? allPhases [ 0 ] . name : '' ;
85
83
84
+ const checkpointPrizes = _ . find ( prizeSets , { type : 'checkpoint' } ) ;
85
+ let numberOfCheckpointsPrizes = 0 ;
86
+ let topCheckPointPrize = 0 ;
87
+ if ( ! _ . isEmpty ( checkpointPrizes ) ) {
88
+ numberOfCheckpointsPrizes = checkpointPrizes . prizes . length ;
89
+ topCheckPointPrize = checkpointPrizes . prizes [ 0 ] . value ;
90
+ }
91
+
86
92
const phases = { } ;
87
93
if ( allPhases ) {
88
94
allPhases . forEach ( ( phase ) => {
@@ -483,8 +489,6 @@ ChallengeHeader.propTypes = {
483
489
legacy : PT . shape ( {
484
490
track : PT . any ,
485
491
} ) ,
486
- numberOfCheckpointsPrizes : PT . any ,
487
- topCheckPointPrize : PT . any ,
488
492
reliabilityBonus : PT . any ,
489
493
userDetails : PT . any ,
490
494
currentPhases : PT . any ,
You can’t perform that action at this time.
0 commit comments