feat: notifications (#7)
This commit is contained in:
parent
b455c37c10
commit
47968146a8
3 changed files with 84 additions and 0 deletions
22
components/notification/NotificationPaginator.client.vue
Normal file
22
components/notification/NotificationPaginator.client.vue
Normal file
|
@ -0,0 +1,22 @@
|
|||
<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>
|
Loading…
Add table
Add a link
Reference in a new issue