1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-07 17:39:59 +00:00
elk/components/notification/NotificationPaginator.client.vue

23 lines
573 B
Vue
Raw Normal View History

2022-11-15 21:21:54 +00:00
<script setup lang="ts">
import type { Notification, Paginator } from 'masto'
const { paginator } = defineProps<{
paginator: Paginator<any, Notification[]>
}>()
const { items: notifications, isLoading, isDone, endAnchor } = usePaginator(paginator)
</script>
<template>
<template v-for="notification of notifications" :key="notification.id">
<NotificationCard :notification="notification" border="t border" pt-4 />
</template>
<div ref="endAnchor" />
<div v-if="isLoading">
Loading...
</div>
<div v-if="isDone">
End of list
</div>
</template>