Skip to content

Commit

Permalink
feat(run goals): fixed issue with non running a goals in case of turn…
Browse files Browse the repository at this point in the history
…ed off feature flag
  • Loading branch information
milan-bc committed May 16, 2022
1 parent b3c0818 commit eb13a9d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { PureComponent } from 'react'
import React from 'react'
import { connect, ConnectedProps } from 'react-redux'
import { bindActionCreators } from 'redux'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ class VerifyEmailContainer extends React.PureComponent<Props> {
nextProps.routerActions.push('/select-product')
} else {
nextProps.routerActions.push('/home')
// for first time login users we need to run goal since this is a first page we show them
// this is must have if feature flag is off
nextProps.saveGoal('welcomeModal', { firstLogin: true })
nextProps.runGoals()
}
}
return null
Expand All @@ -33,16 +37,6 @@ class VerifyEmailContainer extends React.PureComponent<Props> {
securityCenterActions.resendVerifyEmail(email, 'SIGN_UP')
}

skipVerification = () => {
const { email } = this.props
this.props.securityCenterActions.skipVerifyEmail(email)
if (this.props.createExchangeUserFlag) {
this.props.routerActions.push('/select-product')
} else {
this.props.routerActions.push('/home')
}
}

render() {
return <VerifyEmail {...this.props} resendEmail={this.onResendEmail} />
}
Expand All @@ -61,6 +55,8 @@ const mapDispatchToProps = (dispatch) => ({
authActions: bindActionCreators(actions.auth, dispatch),
miscActions: bindActionCreators(actions.core.data.misc, dispatch),
routerActions: bindActionCreators(actions.router, dispatch),
runGoals: () => dispatch(actions.goals.runGoals()),
saveGoal: (name, data) => dispatch(actions.goals.saveGoal({ data, name })),
securityCenterActions: bindActionCreators(actions.modules.securityCenter, dispatch)
})

Expand Down

0 comments on commit eb13a9d

Please sign in to comment.