diff --git a/components/editor.tsx b/components/editor.tsx index 445f25f..21f2bb6 100644 --- a/components/editor.tsx +++ b/components/editor.tsx @@ -24,7 +24,7 @@ interface EditorProps { type FormData = z.infer export function Editor({ post }: EditorProps) { - const { register, handleSubmit, formState } = useForm({ + const { register, handleSubmit } = useForm({ resolver: zodResolver(postPatchSchema), }) const ref = React.useRef() @@ -84,8 +84,6 @@ export function Editor({ post }: EditorProps) { }, [isMounted, initializeEditor]) async function onSubmit(data: FormData) { - if (!formState.isDirty) return - setIsSaving(true) const blocks = await ref.current?.save() @@ -142,7 +140,7 @@ export function Editor({ post }: EditorProps) {