Skip to content

Commit 6fc4c88

Browse files
committed
Revert "Show security reminder when registering"
This reverts commit 35944c0.
1 parent 35944c0 commit 6fc4c88

File tree

3 files changed

+4
-177
lines changed

3 files changed

+4
-177
lines changed

src/shared/components/SecurityReminder/index.jsx

-78
This file was deleted.

src/shared/components/SecurityReminder/styles.scss

-77
This file was deleted.

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

+4-22
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import LoadingIndicator from 'components/LoadingIndicator';
2727
// eslint-disable-next-line max-len
2828
// import RecommendedActiveChallenges from 'components/challenge-detail/RecommendedActiveChallenges';
2929
import Terms from 'containers/Terms';
30-
import SecurityReminder from 'components/SecurityReminder';
3130
import termsActions from 'actions/terms';
3231
import ChallengeCheckpoints from 'components/challenge-detail/Checkpoints';
3332
import React from 'react';
@@ -171,7 +170,6 @@ class ChallengeDetailPageContainer extends React.Component {
171170
},
172171
notFoundCountryFlagUrl: {},
173172
viewAsTable: false,
174-
showSecurityReminder: false,
175173
};
176174

177175
this.instanceId = shortId();
@@ -325,18 +323,17 @@ class ChallengeDetailPageContainer extends React.Component {
325323
auth,
326324
challengeId,
327325
communityId,
326+
openTermsModal,
328327
registerForChallenge,
329328
terms,
330329
} = this.props;
331330
if (!auth.tokenV3) {
332331
const utmSource = communityId || 'community-app-main';
333332
window.location.href = `${config.URL.AUTH}/member?retUrl=${encodeURIComponent(window.location.href)}&utm_source=${utmSource}&regSource=challenges`;
334-
} else if (terms && terms.length > 0) {
335-
this.setState({
336-
showSecurityReminder: true,
337-
});
338-
} else {
333+
} else if (_.every(terms, 'agreed')) {
339334
registerForChallenge(auth, challengeId);
335+
} else {
336+
openTermsModal();
340337
}
341338
}
342339

@@ -385,7 +382,6 @@ class ChallengeDetailPageContainer extends React.Component {
385382
reviewTypes,
386383
openForRegistrationChallenges,
387384
statisticsData,
388-
openTermsModal,
389385
} = this.props;
390386

391387
// const displayRecommendedChallenges = getDisplayRecommendedChallenges(
@@ -402,7 +398,6 @@ class ChallengeDetailPageContainer extends React.Component {
402398
notFoundCountryFlagUrl,
403399
mySubmissionsSort,
404400
viewAsTable,
405-
showSecurityReminder,
406401
} = this.state;
407402

408403
const {
@@ -685,19 +680,6 @@ class ChallengeDetailPageContainer extends React.Component {
685680
}}
686681
/>
687682
)}
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-
)}
701683
{/* {
702684
!isEmpty && displayRecommendedChallenges.length ? (
703685
<RecommendedActiveChallenges

0 commit comments

Comments
 (0)