2025-05-26 11:19:15 +02:00
|
|
|
import type { Status } from "@versia/client/schemas";
|
|
|
|
|
import type { z } from "zod";
|
2024-12-04 14:34:09 +01:00
|
|
|
import { type TimelineOptions, useTimeline } from "./Timeline";
|
|
|
|
|
|
|
|
|
|
export function useGlobalTimeline(
|
2025-05-26 11:19:15 +02:00
|
|
|
options: Partial<TimelineOptions<z.infer<typeof Status>>> = {},
|
2024-12-04 14:34:09 +01:00
|
|
|
) {
|
2025-08-28 07:41:51 +02:00
|
|
|
const authStore = useAuthStore();
|
|
|
|
|
|
|
|
|
|
return useTimeline({
|
2024-12-04 14:34:09 +01:00
|
|
|
// TODO: Implement global timeline in client sdk
|
2025-08-28 07:41:51 +02:00
|
|
|
fetchFunction: (opts) => authStore.client.getPublicTimeline(opts),
|
2024-12-04 14:34:09 +01:00
|
|
|
...options,
|
|
|
|
|
});
|
|
|
|
|
}
|