File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
client/modules/User/pages Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1
1
import PropTypes from 'prop-types' ;
2
- import React , { useEffect } from 'react' ;
2
+ import React , { useState , useEffect } from 'react' ;
3
3
import { connect } from 'react-redux' ;
4
4
import { bindActionCreators } from 'redux' ;
5
5
import { withTranslation } from 'react-i18next' ;
@@ -10,6 +10,7 @@ import RootPage from '../../../components/RootPage';
10
10
import Nav from '../../IDE/components/Header/Nav' ;
11
11
12
12
const EmailVerificationView = ( props ) => {
13
+ const [ verificationAttempted , setVerificationAttempted ] = useState ( false ) ;
13
14
const { emailVerificationTokenState, location, t } = props ;
14
15
15
16
const verificationTokenFromLocation = ( ) => {
@@ -19,8 +20,9 @@ const EmailVerificationView = (props) => {
19
20
20
21
useEffect ( ( ) => {
21
22
const verificationToken = verificationTokenFromLocation ( ) ;
22
- if ( verificationToken != null ) {
23
+ if ( verificationToken != null && ! verificationAttempted ) {
23
24
props . verifyEmailConfirmation ( verificationToken ) ;
25
+ setVerificationAttempted ( true ) ;
24
26
}
25
27
} , [ location , props ] ) ;
26
28
You can’t perform that action at this time.
0 commit comments