chore: clear lint and sync admin story views
This commit is contained in:
@@ -21,6 +21,7 @@ interface StoryItem {
|
||||
title: string
|
||||
image_url: string | null
|
||||
created_at: string
|
||||
mode: string
|
||||
}
|
||||
|
||||
const router = useRouter()
|
||||
@@ -60,6 +61,10 @@ function goToCreate() {
|
||||
showCreateModal.value = true
|
||||
}
|
||||
|
||||
function getStoryPath(story: StoryItem) {
|
||||
return story.mode === 'storybook' ? `/storybook/view/${story.id}` : `/story/${story.id}`
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchStories()
|
||||
if (router.currentRoute.value.query.openCreate) {
|
||||
@@ -140,7 +145,7 @@ onMounted(() => {
|
||||
<router-link
|
||||
v-for="story in stories"
|
||||
:key="story.id"
|
||||
:to="`/story/${story.id}`"
|
||||
:to="getStoryPath(story)"
|
||||
class="block group"
|
||||
>
|
||||
<BaseCard hover padding="none" class="h-full overflow-hidden flex flex-col">
|
||||
|
||||
Reference in New Issue
Block a user