frontend/app/composables/NotificationTimeline.ts
2025-08-28 07:41:51 +02:00

16 lines
488 B
TypeScript

import type { Client } from "@versia/client";
import type { Notification } from "@versia/client/schemas";
import type { z } from "zod";
import { type TimelineOptions, useTimeline } from "./Timeline";
export function useNotificationTimeline(
options: Partial<TimelineOptions<z.infer<typeof Notification>>> = {},
) {
const authStore = useAuthStore();
return useTimeline({
fetchFunction: (opts) => authStore.client.getNotifications(opts),
...options,
});
}