Browse Source

Close modal after importing accounts

master
meriadec 7 years ago
parent
commit
147cb93646
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 17
      src/components/modals/AddAccount/index.js

17
src/components/modals/AddAccount/index.js

@ -228,21 +228,12 @@ class AddAccountModal extends PureComponent<Props, State> {
handleChangeStatus = (deviceStatus, appStatus) => this.setState({ appStatus })
handleImportAccount = () => {
const { archivedAccounts, updateAccount } = this.props
const { archivedAccounts, updateAccount, closeModal } = this.props
const { selectedAccounts } = this.state
const accounts = archivedAccounts.filter(a => selectedAccounts.includes(a.id))
accounts.forEach(a =>
updateAccount({
...a,
archived: false,
}),
)
this.setState({
selectedAccounts: [],
})
accounts.forEach(a => updateAccount({ ...a, archived: false }))
this.setState({ selectedAccounts: [] })
closeModal(MODAL_ADD_ACCOUNT)
}
handleNextStep = () => {

Loading…
Cancel
Save