fix redirect after creating new article
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user