mirror of
https://github.com/urbit/shrub.git
synced 2025-01-07 05:26:56 +03:00
Merge pull request #3874 from tylershuster/post-fix
publish: fix aggressive exit prevention
This commit is contained in:
commit
7c9d12aa3a
@ -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."
|
||||
/>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user