diff --git a/js/src/ui/Actionbar/Import/import.js b/js/src/ui/Actionbar/Import/import.js index 776e5bb08..081fe1a17 100644 --- a/js/src/ui/Actionbar/Import/import.js +++ b/js/src/ui/Actionbar/Import/import.js @@ -29,6 +29,8 @@ const initialState = { show: false, validate: false, validationBody: null, + error: false, + errorText: '', content: '' }; @@ -65,7 +67,7 @@ export default class ActionbarImport extends Component { renderModal () { const { title, renderValidation } = this.props; - const { show, step } = this.state; + const { show, step, error } = this.state; if (!show) { return null; @@ -73,7 +75,7 @@ export default class ActionbarImport extends Component { const hasSteps = typeof renderValidation === 'function'; - const steps = hasSteps ? [ 'select a file', 'validate' ] : null; + const steps = hasSteps ? [ 'select a file', error ? 'error' : 'validate' ] : null; return ( ); + if (error) { + return [ cancelBtn ]; + } + if (validate) { const confirmBtn = (