diff --git a/components/sidebars/navigation.vue b/components/sidebars/navigation.vue index 9fe4658..901fa48 100644 --- a/components/sidebars/navigation.vue +++ b/components/sidebars/navigation.vue @@ -9,7 +9,7 @@

Timelines

- {{ timeline.name }} @@ -54,6 +54,12 @@ \ No newline at end of file diff --git a/composables/HomeTimeline.ts b/composables/HomeTimeline.ts new file mode 100644 index 0000000..67d4e0c --- /dev/null +++ b/composables/HomeTimeline.ts @@ -0,0 +1,23 @@ +import type { Mastodon } from "megalodon"; +import type { Status } from "~/types/mastodon/status"; + +export const useHomeTimeline = ( + client: Mastodon | null, + options: MaybeRef<{ + local?: boolean; + limit?: number; + max_id?: string; + since_id?: string; + min_id?: string; + }>, +): { + timeline: Ref; + loadNext: () => Promise; + loadPrev: () => Promise; +} => { + return useTimeline( + client, + (client, options) => client?.getHomeTimeline(options), + options, + ); +}; diff --git a/pages/home.vue b/pages/home.vue new file mode 100644 index 0000000..08130b4 --- /dev/null +++ b/pages/home.vue @@ -0,0 +1,9 @@ + + + \ No newline at end of file