fix redirect after creating new article

This commit is contained in:
2026-09-04 17:05:37 +00:00
parent 739d8486b2
commit 1311831fe9

View File

@@ -61,17 +61,7 @@
{#if createNewArticlePopup} {#if createNewArticlePopup}
<div class="fixed inset-0 flex items-center justify-center bg-black/40"> <div class="fixed inset-0 flex items-center justify-center bg-black/40">
<form <form method="POST" use:enhance class="w-80 rounded bg-white p-6 shadow-xl">
method="POST"
use:enhance={() => {
return async ({ result }) => {
if (result.type !== 'redirect') {
createNewArticlePopup = false;
}
};
}}
class="w-80 rounded bg-white p-6 shadow-xl"
>
<h2 class="mb-4 text-lg font-bold">Create New Article</h2> <h2 class="mb-4 text-lg font-bold">Create New Article</h2>
<input <input
name="title" name="title"