diff --git a/packages/web/src/components/ImportFlowDialog/index.jsx b/packages/web/src/components/ImportFlowDialog/index.jsx index cc5d8609..4fd7f884 100644 --- a/packages/web/src/components/ImportFlowDialog/index.jsx +++ b/packages/web/src/components/ImportFlowDialog/index.jsx @@ -16,13 +16,10 @@ import * as URLS from 'config/urls'; import useFormatMessage from 'hooks/useFormatMessage'; import FileUploadInput from 'components/FileUploadInput'; import useImportFlow from 'hooks/useImportFlow'; +import { getUnifiedErrorMessage } from 'helpers/errors'; function ImportFlowDialog(props) { - const { - onClose, - open = true, - 'data-test': dataTest = 'import-flow-dialog', - } = props; + const { open = true, 'data-test': dataTest = 'import-flow-dialog' } = props; const [hasParsingError, setParsingError] = React.useState(false); const [selectedFile, setSelectedFile] = React.useState(null); @@ -72,6 +69,10 @@ function ImportFlowDialog(props) { fileReader.readAsText(selectedFile); }; + const onClose = () => { + navigate('..'); + }; + return ( {formatMessage('importFlowDialog.title')} @@ -99,10 +100,10 @@ function ImportFlowDialog(props) { - +