2024-08-28 00:23:29 +02:00
|
|
|
import type { Client } from "@versia/client";
|
2025-05-26 11:19:15 +02:00
|
|
|
import type { Status } from "@versia/client/schemas";
|
|
|
|
|
import type { z } from "zod";
|
2024-06-29 05:05:50 +02:00
|
|
|
import { type TimelineOptions, useTimeline } from "./Timeline";
|
2024-04-29 04:59:28 +02:00
|
|
|
|
2024-06-29 05:05:50 +02:00
|
|
|
export function useHomeTimeline(
|
2024-08-28 00:23:29 +02:00
|
|
|
client: Client,
|
2025-05-26 11:19:15 +02:00
|
|
|
options: Partial<TimelineOptions<z.infer<typeof Status>>> = {},
|
2024-06-29 05:05:50 +02:00
|
|
|
) {
|
|
|
|
|
return useTimeline(client, {
|
|
|
|
|
fetchFunction: (client, opts) => client.getHomeTimeline(opts),
|
|
|
|
|
...options,
|
|
|
|
|
});
|
|
|
|
|
}
|