mirror of
https://github.com/versia-pub/frontend.git
synced 2026-06-14 15:39:15 +02:00
refactor: ♻️ Rewrite state system to use Pinia for composer and auth
This commit is contained in:
parent
a6db9e059d
commit
b510782a30
80 changed files with 999 additions and 1011 deletions
|
|
@ -1,16 +1,16 @@
|
|||
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),
|
||||
const authStore = useAuthStore();
|
||||
|
||||
return useTimeline({
|
||||
fetchFunction: (opts) =>
|
||||
authStore.client.getAccountStatuses(accountId, opts),
|
||||
...options,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue