Skip to content

Commit

Permalink
fix(harvest-lib): Redirection when close EditAccountModal
Browse files Browse the repository at this point in the history
With the new synchronization banner,
closing the edit modal must redirect to the configuration modal
  • Loading branch information
Merkur39 committed Feb 2, 2023
1 parent c56a74a commit 3b0dc42
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -5,6 +5,7 @@ import cx from 'classnames'
import get from 'lodash/get'
import flow from 'lodash/flow'

import flag from 'cozy-flags'
import { withClient } from 'cozy-client'
import Spinner from 'cozy-ui/transpiled/react/Spinner'
import CipherIcon from 'cozy-ui/transpiled/react/CipherIcon'
Expand Down Expand Up @@ -168,7 +169,9 @@ export class EditAccountModal extends Component {
redirectToAccount() {
const { account } = this.state
if (account) {
this.props.replaceHistory(`/accounts/${account._id}`)
flag('harvest.inappconnectors.enabled')
? this.props.replaceHistory(`/accounts/${account._id}/config`)
: this.props.replaceHistory(`/accounts/${account._id}`)
} else {
this.props.pushHistory(`/accounts`)
}
Expand Down

0 comments on commit 3b0dc42

Please sign in to comment.