mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
feat: ✨ Add home timeline for logged-in users
This commit is contained in:
parent
63cbe6bb82
commit
8c68957df8
4 changed files with 56 additions and 1 deletions
17
components/timelines/Home.vue
Normal file
17
components/timelines/Home.vue
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<template>
|
||||
<TimelinesTimeline :timeline="timeline" :load-next="loadNext" :load-prev="loadPrev" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const tokenData = useTokenData();
|
||||
const client = useMegalodon(tokenData);
|
||||
const timelineParameters = ref({});
|
||||
const { timeline, loadNext, loadPrev } = useHomeTimeline(
|
||||
client.value,
|
||||
timelineParameters,
|
||||
);
|
||||
|
||||
useListen("note:delete", ({ id }) => {
|
||||
timeline.value = timeline.value.filter((note) => note.id !== id);
|
||||
});
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue