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 @@ -
-
- - - - - -