mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-13 20:04:35 +03:00
publish: fix aggressive exit prevention
Let the people post in peace!
This commit is contained in:
parent
31b7c61d9a
commit
9aab895e97
@ -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