frontend/components/timelines/account.vue
2024-06-20 19:12:04 -10:00

23 lines
538 B
Vue

<template>
<Timeline :timeline="timeline" :load-next="loadNext" :load-prev="loadPrev" />
</template>
<script lang="ts" setup>
import Timeline from "./timeline.vue";
const props = defineProps<{
id?: string;
}>();
const client = useClient();
const timelineParameters = ref({});
const { timeline, loadNext, loadPrev } = useAccountTimeline(
client.value,
props.id || null,
timelineParameters,
);
useListen("note:delete", ({ id }) => {
timeline.value = timeline.value.filter((note) => note.id !== id);
});
</script>