feat(app): reset form on load

This commit is contained in:
Lars Hampe 2024-11-10 07:26:20 +01:00
parent e98709d854
commit 9422eaed7e

View File

@ -76,8 +76,9 @@ const Component = () => {
useEffect(() => {
if (data) {
mdxEditorRef.current?.setMarkdown(data.markdown)
form.reset(data)
}
}, [data])
}, [data, form])
if (error) {
return (