<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");
</script>

<template>
	<a-list :grid="{ gutter: [16, 16], md: 2, lg: 3, xxl: 3, sm: 1 }" :data-source="stories.stories">
		<template #renderItem="{ item }">
			<single-story :story="item" show-actions />
		</template>
	</a-list>
</template>
