@@ -27,7 +27,6 @@ import LoadingIndicator from 'components/LoadingIndicator';
27
27
// eslint-disable-next-line max-len
28
28
// import RecommendedActiveChallenges from 'components/challenge-detail/RecommendedActiveChallenges';
29
29
import Terms from 'containers/Terms' ;
30
- import SecurityReminder from 'components/SecurityReminder' ;
31
30
import termsActions from 'actions/terms' ;
32
31
import ChallengeCheckpoints from 'components/challenge-detail/Checkpoints' ;
33
32
import React from 'react' ;
@@ -171,7 +170,6 @@ class ChallengeDetailPageContainer extends React.Component {
171
170
} ,
172
171
notFoundCountryFlagUrl : { } ,
173
172
viewAsTable : false ,
174
- showSecurityReminder : false ,
175
173
} ;
176
174
177
175
this . instanceId = shortId ( ) ;
@@ -325,18 +323,17 @@ class ChallengeDetailPageContainer extends React.Component {
325
323
auth,
326
324
challengeId,
327
325
communityId,
326
+ openTermsModal,
328
327
registerForChallenge,
329
328
terms,
330
329
} = this . props ;
331
330
if ( ! auth . tokenV3 ) {
332
331
const utmSource = communityId || 'community-app-main' ;
333
332
window . location . href = `${ config . URL . AUTH } /member?retUrl=${ encodeURIComponent ( window . location . href ) } &utm_source=${ utmSource } ®Source=challenges` ;
334
- } else if ( terms && terms . length > 0 ) {
335
- this . setState ( {
336
- showSecurityReminder : true ,
337
- } ) ;
338
- } else {
333
+ } else if ( _ . every ( terms , 'agreed' ) ) {
339
334
registerForChallenge ( auth , challengeId ) ;
335
+ } else {
336
+ openTermsModal ( ) ;
340
337
}
341
338
}
342
339
@@ -385,7 +382,6 @@ class ChallengeDetailPageContainer extends React.Component {
385
382
reviewTypes,
386
383
openForRegistrationChallenges,
387
384
statisticsData,
388
- openTermsModal,
389
385
} = this . props ;
390
386
391
387
// const displayRecommendedChallenges = getDisplayRecommendedChallenges(
@@ -402,7 +398,6 @@ class ChallengeDetailPageContainer extends React.Component {
402
398
notFoundCountryFlagUrl,
403
399
mySubmissionsSort,
404
400
viewAsTable,
405
- showSecurityReminder,
406
401
} = this . state ;
407
402
408
403
const {
@@ -685,19 +680,6 @@ class ChallengeDetailPageContainer extends React.Component {
685
680
} }
686
681
/>
687
682
) }
688
- { showSecurityReminder && (
689
- < SecurityReminder
690
- onCancel = { ( ) => this . setState ( { showSecurityReminder : false } ) }
691
- onOk = { ( ) => {
692
- this . setState ( { showSecurityReminder : false } ) ;
693
- if ( _ . every ( terms , 'agreed' ) ) {
694
- registerForChallenge ( auth , challengeId ) ;
695
- } else {
696
- openTermsModal ( ) ;
697
- }
698
- } }
699
- />
700
- ) }
701
683
{ /* {
702
684
!isEmpty && displayRecommendedChallenges.length ? (
703
685
<RecommendedActiveChallenges
0 commit comments