refactor(components): wrap story actions component's buttons in a nuxt-link

This commit is contained in:
parent dcda8143f9
commit 7a9cbb1ffb
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -3,6 +3,7 @@
import { IStory } from "@models/stories"; import { IStory } from "@models/stories";
import { deleteStory } from "@client/storyActions"; import { deleteStory } from "@client/storyActions";
const props = defineProps<{ story: IStory }>(); const props = defineProps<{ story: IStory }>();
console.log("SINFO", props.story._id);
</script> </script>
<template> <template>
@ -14,14 +15,18 @@
</a-tooltip> </a-tooltip>
</a-popconfirm> </a-popconfirm>
<a-tooltip title="Edit"> <a-tooltip title="Edit">
<a-button type="ghost" @click="$router.push(`/story/${story._id}/edit`)"> <nuxt-link :to="`/story/${story._id}/edit`">
<a-button type="ghost">
<icon istyle="regular" name="pen-to-square" /> <icon istyle="regular" name="pen-to-square" />
</a-button> </a-button>
</nuxt-link>
</a-tooltip> </a-tooltip>
<a-tooltip title="View"> <a-tooltip title="View">
<a-button type="ghost" @click="$router.push(`/story/${story._id}/${story.chapters.length}`)"> <nuxt-link :to="`/story/${story._id}/${story.chapters.length}`">
<a-button type="ghost">
<icon istyle="regular" name="eye" /> <icon istyle="regular" name="eye" />
</a-button> </a-button>
</nuxt-link>
</a-tooltip> </a-tooltip>
</template> </template>