32 lines
801 B
Vue
32 lines
801 B
Vue
<script setup lang="ts">
|
|
|
|
// state
|
|
|
|
import useGetArticles from "~/composables/api/blog/useGetArticles";
|
|
|
|
const page = ref(1);
|
|
const { data: articles, suspense } = useGetArticles(page);
|
|
|
|
// ssr
|
|
|
|
await suspense();
|
|
|
|
</script>
|
|
|
|
<template>
|
|
<section class="mt-20 px-20">
|
|
<div class="flex items-center justify-between mb-20">
|
|
<span class="typo-h-4 text-black">
|
|
مقالات اخیر سایت
|
|
</span>
|
|
<NuxtLink to="/articles">
|
|
<Button variant="outlined" class="rounded-full" start-icon="ci:paper">
|
|
نمایش همه
|
|
</Button>
|
|
</NuxtLink>
|
|
</div>
|
|
<ClientOnly>
|
|
<ArticlesList :articles="articles!.results" />
|
|
</ClientOnly>
|
|
</section>
|
|
</template> |