diff --git a/monkey/monkey_island/cc/ui/src/components/configuration-components/ExportConfigModal.tsx b/monkey/monkey_island/cc/ui/src/components/configuration-components/ExportConfigModal.tsx index 0b1df67e2..3457555c4 100644 --- a/monkey/monkey_island/cc/ui/src/components/configuration-components/ExportConfigModal.tsx +++ b/monkey/monkey_island/cc/ui/src/components/configuration-components/ExportConfigModal.tsx @@ -8,7 +8,7 @@ import '../../styles/components/configuration-components/ExportConfigModal.scss' type Props = { show: boolean, - onClick: () => void + onHide: () => void } const ConfigExportModal = (props: Props) => { @@ -45,12 +45,13 @@ const ConfigExportModal = (props: Props) => { ); } FileSaver.saveAs(configToExport, 'monkey.conf'); + props.onHide(); }) } return ( diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js index 0aae3f356..74f7b5b4d 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js @@ -228,16 +228,14 @@ class ConfigurePageComponent extends AuthComponent { renderConfigExportModal = () => { return () - } - - onExport = () => { - this.setState({showConfigExportModal: false}) + onHide={() => { + this.setState({showConfigExportModal: false}); + }}/>); } renderConfigImportModal = () => { return () + onClose={this.onClose}/>); } onClose = (importSuccessful) => {