diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-11-11 00:51:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-11 00:51:23 +0100 |
| commit | e1716ee419c218f879c046917eaeb1e566230b0e (patch) | |
| tree | 399969e871ef89f427707c927ff5e65d4c14eba8 /frontend/src/components/modals/Modal.js | |
| parent | f3f8d1d494a08a032940c6587c7865cd0ac0dd7a (diff) | |
| parent | e6c36a309c7372bb0de3ae4a3277e91c1ee4913b (diff) | |
Merge pull request #62 from atlarge-research/bug/tutorial
Implement various fixes in preparation for tutorial
Diffstat (limited to 'frontend/src/components/modals/Modal.js')
| -rw-r--r-- | frontend/src/components/modals/Modal.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/frontend/src/components/modals/Modal.js b/frontend/src/components/modals/Modal.js index b494d970..21b7f119 100644 --- a/frontend/src/components/modals/Modal.js +++ b/frontend/src/components/modals/Modal.js @@ -9,12 +9,14 @@ function Modal({ children, title, show, onSubmit, onCancel, submitButtonType, su const toggle = () => setModal(!modal) const cancel = () => { - toggle() - onCancel() + if (onCancel() !== false) { + toggle() + } } const submit = () => { - toggle() - onSubmit() + if (onSubmit() !== false) { + toggle() + } } return ( |
