next/pages/my-stuff/stories.vue

17 lines
533 B
Vue
Raw Normal View History

2023-12-31 01:52:38 -05:00
<script setup lang="ts">
import SingleStory from "~/components/listings/singleStory.vue";
import { IStory } from "@models/stories";
definePageMeta({
middleware: ["auth"],
});
const { data: stories, error } = await useApiFetch<{ stories: IStory[]; total: number }>("/user/me/stories");
2023-12-31 01:52:38 -05:00
</script>
<template>
<a-list :grid="{ gutter: [16, 16], md: 2, lg: 3, xxl: 3, sm: 1 }" :data-source="stories.stories">
2023-12-31 01:52:38 -05:00
<template #renderItem="{ item }">
<single-story :story="item" show-actions />
</template>
</a-list>
</template>