@@ -502,63 +502,73 @@ class ChallengeDetailPageContainer extends React.Component {
502
502
updateChallenge = { ( x ) => updateChallenge ( x , auth . tokenV3 ) }
503
503
/>
504
504
) }
505
- { ! isEmpty && selectedTab === DETAIL_TABS . REGISTRANTS && isLoadingFullChallenge && (
506
- < LoadingIndicator />
507
- ) }
508
- { ! isEmpty && selectedTab === DETAIL_TABS . REGISTRANTS && ! isLoadingFullChallenge && (
509
- < Registrants
510
- challenge = { challenge }
511
- registrants = { challenge . registrants }
512
- checkpointResults = { _ . merge (
513
- checkpointResults ,
514
- checkpointResultsUi
515
- ) }
516
- results = { results2 }
517
- registrantsSort = { registrantsSort }
518
- notFoundCountryFlagUrl = { notFoundCountryFlagUrl }
519
- onGetFlagImageFail = { ( countryInfo ) => {
520
- notFoundCountryFlagUrl [ countryInfo . countryCode ] = true ;
521
- this . setState ( { notFoundCountryFlagUrl } ) ;
522
- } }
523
- onSortChange = { ( sort ) => this . setState ( { registrantsSort : sort } ) }
524
- />
525
- ) }
505
+ { ! isEmpty &&
506
+ selectedTab === DETAIL_TABS . REGISTRANTS &&
507
+ isLoadingFullChallenge && < LoadingIndicator /> }
508
+ { ! isEmpty &&
509
+ selectedTab === DETAIL_TABS . REGISTRANTS &&
510
+ ! isLoadingFullChallenge && (
511
+ < Registrants
512
+ challenge = { challenge }
513
+ registrants = { challenge . registrants }
514
+ checkpointResults = { _ . merge (
515
+ checkpointResults ,
516
+ checkpointResultsUi
517
+ ) }
518
+ results = { results2 }
519
+ registrantsSort = { registrantsSort }
520
+ notFoundCountryFlagUrl = { notFoundCountryFlagUrl }
521
+ onGetFlagImageFail = { ( countryInfo ) => {
522
+ notFoundCountryFlagUrl [ countryInfo . countryCode ] = true ;
523
+ this . setState ( { notFoundCountryFlagUrl } ) ;
524
+ } }
525
+ onSortChange = { ( sort ) =>
526
+ this . setState ( { registrantsSort : sort } )
527
+ }
528
+ />
529
+ ) }
526
530
{ ! isEmpty && selectedTab === DETAIL_TABS . CHECKPOINTS && (
527
531
< ChallengeCheckpoints
528
532
checkpoints = { checkpoints }
529
533
toggleCheckpointFeedback = { toggleCheckpointFeedback }
530
534
/>
531
535
) }
532
- { ! isEmpty && isLoggedIn && selectedTab === DETAIL_TABS . SUBMISSIONS && isLoadingFullChallenge && (
533
- < LoadingIndicator />
534
- ) }
535
- { ! isEmpty && isLoggedIn && selectedTab === DETAIL_TABS . SUBMISSIONS && ! isLoadingFullChallenge && (
536
- < Submissions
537
- challenge = { challenge }
538
- submissions = { challenge . submissions }
539
- loadingMMSubmissionsForChallengeId = {
540
- loadingMMSubmissionsForChallengeId
541
- }
542
- mmSubmissions = { mmSubmissions }
543
- loadMMSubmissions = { loadMMSubmissions }
544
- auth = { auth }
545
- isLoadingSubmissionInformation = { isLoadingSubmissionInformation }
546
- submssionInformation = { submissionInformation }
547
- loadSubmissionInformation = { loadSubmissionInformation }
548
- submissionsSort = { submissionsSort }
549
- notFoundCountryFlagUrl = { notFoundCountryFlagUrl }
550
- onGetFlagImageFail = { ( countryInfo ) => {
551
- notFoundCountryFlagUrl [ countryInfo . countryCode ] = true ;
552
- this . setState ( { notFoundCountryFlagUrl } ) ;
553
- } }
554
- onSortChange = { ( sort ) => this . setState ( { submissionsSort : sort } ) }
555
- hasRegistered = { challenge . isRegistered }
556
- unregistering = { unregistering }
557
- isLegacyMM = { isLegacyMM }
558
- submissionEnded = { submissionEnded }
559
- challengesUrl = { challengesUrl }
560
- />
561
- ) }
536
+ { ! isEmpty &&
537
+ isLoggedIn &&
538
+ selectedTab === DETAIL_TABS . SUBMISSIONS &&
539
+ isLoadingFullChallenge && < LoadingIndicator /> }
540
+ { ! isEmpty &&
541
+ isLoggedIn &&
542
+ selectedTab === DETAIL_TABS . SUBMISSIONS &&
543
+ ! isLoadingFullChallenge && (
544
+ < Submissions
545
+ challenge = { challenge }
546
+ submissions = { challenge . submissions }
547
+ loadingMMSubmissionsForChallengeId = {
548
+ loadingMMSubmissionsForChallengeId
549
+ }
550
+ mmSubmissions = { mmSubmissions }
551
+ loadMMSubmissions = { loadMMSubmissions }
552
+ auth = { auth }
553
+ isLoadingSubmissionInformation = { isLoadingSubmissionInformation }
554
+ submssionInformation = { submissionInformation }
555
+ loadSubmissionInformation = { loadSubmissionInformation }
556
+ submissionsSort = { submissionsSort }
557
+ notFoundCountryFlagUrl = { notFoundCountryFlagUrl }
558
+ onGetFlagImageFail = { ( countryInfo ) => {
559
+ notFoundCountryFlagUrl [ countryInfo . countryCode ] = true ;
560
+ this . setState ( { notFoundCountryFlagUrl } ) ;
561
+ } }
562
+ onSortChange = { ( sort ) =>
563
+ this . setState ( { submissionsSort : sort } )
564
+ }
565
+ hasRegistered = { challenge . isRegistered }
566
+ unregistering = { unregistering }
567
+ isLegacyMM = { isLegacyMM }
568
+ submissionEnded = { submissionEnded }
569
+ challengesUrl = { challengesUrl }
570
+ />
571
+ ) }
562
572
{ isMM && ! isEmpty && selectedTab === DETAIL_TABS . MY_SUBMISSIONS && (
563
573
< MySubmissions
564
574
challengesUrl = { challengesUrl }
@@ -828,7 +838,9 @@ function mapStateToProps(state, props) {
828
838
communitiesList : state . tcCommunities . list ,
829
839
domain : state . domain ,
830
840
isLoadingChallenge : Boolean ( state . challenge . loadingDetailsForChallengeId ) ,
831
- isLoadingFullChallenge : Boolean ( state . challenge . loadingFullDetailsForChallengeId ) ,
841
+ isLoadingFullChallenge : Boolean (
842
+ state . challenge . loadingFullDetailsForChallengeId
843
+ ) ,
832
844
isLoadingTerms : _ . isEqual ( state . terms . loadingTermsForEntity , {
833
845
type : "challenge" ,
834
846
id : props . match . params . challengeId ,
@@ -906,15 +918,15 @@ const mapDispatchToProps = (dispatch) => {
906
918
} ) ;
907
919
} ,
908
920
loadFullChallengeDetails : ( tokens , challengeId ) => {
909
- const a = actions . challenge ;
921
+ const a = actions . challenge ;
910
922
911
- dispatch ( a . getFullDetailsInit ( challengeId ) ) ;
912
- dispatch (
913
- a . getFullDetailsDone ( challengeId , tokens . tokenV3 , tokens . tokenV2 )
914
- ) . then ( ( res ) => {
915
- return res ;
916
- } ) ;
917
- } ,
923
+ dispatch ( a . getFullDetailsInit ( challengeId ) ) ;
924
+ dispatch (
925
+ a . getFullDetailsDone ( challengeId , tokens . tokenV3 , tokens . tokenV2 )
926
+ ) . then ( ( res ) => {
927
+ return res ;
928
+ } ) ;
929
+ } ,
918
930
registerForChallenge : ( auth , challengeId ) => {
919
931
const a = actions . challenge ;
920
932
dispatch ( a . registerInit ( ) ) ;
0 commit comments