🐛 Fix editing

This commit is contained in:
LittleSheep 2024-02-05 22:22:53 +08:00
parent 3f005a7c5f
commit f3ff8e8222

View File

@ -73,7 +73,7 @@ export default function PostPublish(props: {
} else {
form.reset();
props.onError(null);
setTimeout(() => props.onPost(), 250);
props.onPost();
}
setSubmitting(false);
}
@ -109,7 +109,7 @@ export default function PostPublish(props: {
} else {
form.reset();
props.onError(null);
setTimeout(() => props.onPost(), 250);
props.onPost();
}
setSubmitting(false);
}
@ -192,7 +192,7 @@ export default function PostPublish(props: {
return (
<>
<form id="publish" onSubmit={props.editing ? doEdit : doPost} onReset={() => resetForm()}>
<form id="publish" onSubmit={(evt) => (props.editing ? doEdit : doPost)(evt)} onReset={() => resetForm()}>
<div id="publish-identity" class="flex border-y border-base-200">
<div class="avatar pl-[20px]">
<div class="w-12">