refactor(components): wrap story actions component's buttons in a nuxt-link
This commit is contained in:
parent
dcda8143f9
commit
7a9cbb1ffb
@ -1,8 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { theme } from "ant-design-vue";
|
||||
import { IStory } from "@models/stories";
|
||||
import { deleteStory } from "@client/storyActions";
|
||||
const props = defineProps<{ story: IStory }>();
|
||||
import { theme } from "ant-design-vue";
|
||||
import { IStory } from "@models/stories";
|
||||
import { deleteStory } from "@client/storyActions";
|
||||
const props = defineProps<{ story: IStory }>();
|
||||
console.log("SINFO", props.story._id);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -14,14 +15,18 @@
|
||||
</a-tooltip>
|
||||
</a-popconfirm>
|
||||
<a-tooltip title="Edit">
|
||||
<a-button type="ghost" @click="$router.push(`/story/${story._id}/edit`)">
|
||||
<icon istyle="regular" name="pen-to-square" />
|
||||
</a-button>
|
||||
<nuxt-link :to="`/story/${story._id}/edit`">
|
||||
<a-button type="ghost">
|
||||
<icon istyle="regular" name="pen-to-square" />
|
||||
</a-button>
|
||||
</nuxt-link>
|
||||
</a-tooltip>
|
||||
<a-tooltip title="View">
|
||||
<a-button type="ghost" @click="$router.push(`/story/${story._id}/${story.chapters.length}`)">
|
||||
<icon istyle="regular" name="eye" />
|
||||
</a-button>
|
||||
<nuxt-link :to="`/story/${story._id}/${story.chapters.length}`">
|
||||
<a-button type="ghost">
|
||||
<icon istyle="regular" name="eye" />
|
||||
</a-button>
|
||||
</nuxt-link>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user