refactor: use paginator for explore
This commit is contained in:
parent
3d25243166
commit
6308aa5c9a
4 changed files with 43 additions and 68 deletions
22
components/tag/TagCardPaginator.vue
Normal file
22
components/tag/TagCardPaginator.vue
Normal file
|
@ -0,0 +1,22 @@
|
|||
<script setup lang="ts">
|
||||
import type { Paginator, mastodon } from 'masto'
|
||||
|
||||
const { paginator } = defineProps<{
|
||||
paginator: Paginator<mastodon.v1.Tag[], mastodon.DefaultPaginationParams>
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<CommonPaginator :paginator="paginator" key-prop="name">
|
||||
<template #default="{ item }">
|
||||
<TagCard :tag="item" border="b base" />
|
||||
</template>
|
||||
<template #loading>
|
||||
<TagCardSkeleton border="b base" />
|
||||
<TagCardSkeleton border="b base" />
|
||||
<TagCardSkeleton border="b base" op50 />
|
||||
<TagCardSkeleton border="b base" op50 />
|
||||
<TagCardSkeleton border="b base" op25 />
|
||||
</template>
|
||||
</CommonPaginator>
|
||||
</template>
|
|
@ -1,13 +0,0 @@
|
|||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
|
||||
defineProps<{
|
||||
timelines: mastodon.v1.Status[]
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<template v-for="status of timelines" :key="status.id">
|
||||
<StatusCard :status="status" border="t base" />
|
||||
</template>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue