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 }) handleChangeStatus = (deviceStatus, appStatus) => this.setState({ appStatus })
handleImportAccount = () => { handleImportAccount = () => {
const { archivedAccounts, updateAccount } = this.props const { archivedAccounts, updateAccount, closeModal } = this.props
const { selectedAccounts } = this.state const { selectedAccounts } = this.state
const accounts = archivedAccounts.filter(a => selectedAccounts.includes(a.id)) const accounts = archivedAccounts.filter(a => selectedAccounts.includes(a.id))
accounts.forEach(a => updateAccount({ ...a, archived: false }))
accounts.forEach(a => this.setState({ selectedAccounts: [] })
updateAccount({ closeModal(MODAL_ADD_ACCOUNT)
...a,
archived: false,
}),
)
this.setState({
selectedAccounts: [],
})
} }
handleNextStep = () => { handleNextStep = () => {

Loading…
Cancel
Save