From b10928fcf7236c251ff66d370f0fc5ea3b69406f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 16 Mar 2024 15:29:21 -0400 Subject: [PATCH] fix(components): wrap draggable in `client-only` --- components/story/create/storyForm.vue | 131 ++++++++++++++------------ 1 file changed, 70 insertions(+), 61 deletions(-) diff --git a/components/story/create/storyForm.vue b/components/story/create/storyForm.vue index 942e4b4..749b356 100644 --- a/components/story/create/storyForm.vue +++ b/components/story/create/storyForm.vue @@ -12,6 +12,8 @@ import singleChapter from "./singleChapter.vue"; import icon from "~/components/icon.vue"; + const router = useRouter(); + const props = defineProps<{ canDraft?: boolean; endpoint: string; @@ -47,6 +49,9 @@ method: "post", body: values, }); + if (dat.success) { + await router.push(`/story/${dat.story._id}/1`); + } } } else { await autoEdit(values, props.endpoint, props.endpointMethod); @@ -107,70 +112,74 @@ -
-
- - - - - -