feat: Add Enum preference type support

This commit is contained in:
Jesse Wierzbinski 2024-12-04 14:34:09 +01:00
parent ca824a2a1a
commit dca7af4b0e
No known key found for this signature in database
10 changed files with 149 additions and 4 deletions

View file

@ -0,0 +1,14 @@
import type { Client } from "@versia/client";
import type { Status } from "@versia/client/types";
import { type TimelineOptions, useTimeline } from "./Timeline";
export function useGlobalTimeline(
client: Client,
options: Partial<TimelineOptions<Status>> = {},
) {
return useTimeline(client, {
// TODO: Implement global timeline in client sdk
fetchFunction: (client, opts) => client.getPublicTimeline(opts),
...options,
});
}