mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-23 18:17:44 +02:00
15 lines
451 B
TypeScript
15 lines
451 B
TypeScript
import { queryOptions } from "@tanstack/react-query";
|
|
import { api } from "../api";
|
|
|
|
export const pinKeys = {
|
|
all: (wsId: string, userId: string) => ["pins", wsId, userId] as const,
|
|
list: (wsId: string, userId: string) => [...pinKeys.all(wsId, userId), "list"] as const,
|
|
};
|
|
|
|
export function pinListOptions(wsId: string, userId: string) {
|
|
return queryOptions({
|
|
queryKey: pinKeys.list(wsId, userId),
|
|
queryFn: () => api.listPins(),
|
|
});
|
|
}
|