mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 16:38:20 +01:00
17 lines
506 B
TypeScript
17 lines
506 B
TypeScript
import type { Client } from "@versia/client";
|
|
import type { Status } from "@versia/client/schemas";
|
|
import type { z } from "zod";
|
|
import { type TimelineOptions, useTimeline } from "./Timeline";
|
|
|
|
export function useAccountTimeline(
|
|
client: Client,
|
|
accountId: string,
|
|
options: Partial<TimelineOptions<z.infer<typeof Status>>> = {},
|
|
) {
|
|
return useTimeline(client, {
|
|
fetchFunction: (client, opts) =>
|
|
client.getAccountStatuses(accountId, opts),
|
|
...options,
|
|
});
|
|
}
|