publish: fix aggressive exit prevention

Let the people post in peace!
This commit is contained in:
Tyler Brown Cifu Shuster 2020-11-03 10:21:23 -08:00
parent 31b7c61d9a
commit 9aab895e97

View File

@ -26,10 +26,10 @@ interface MarkdownEditorProps {
const PromptIfDirty = () => {
const formik = useFormikContext();
usePreventWindowUnload(formik.dirty);
usePreventWindowUnload(formik.dirty && !formik.isSubmitting);
return (
<Prompt
when={formik.dirty}
when={formik.dirty && !formik.isSubmitting}
message="Are you sure you want to leave? You have unsaved changes."
/>
);