This commit is contained in:
yohlo
2025-08-20 22:35:40 -05:00
commit f51c278cd3
169 changed files with 8173 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import { queryOptions } from "@tanstack/react-query";
import { listPlayers, getPlayer, getUnassociatedPlayers } from "./server";
const playerKeys = {
list: ['players', 'list'] as const,
details: (id: string) => ['players', 'details', id] as const,
unassociated: ['players','unassociated'] as const,
};
export const playerQueries = {
list: () => queryOptions({
queryKey: playerKeys.list,
queryFn: listPlayers,
}),
details: (id: string) => queryOptions({
queryKey: playerKeys.details(id),
queryFn: () => getPlayer({ data: id }),
}),
unassociated: () => queryOptions({
queryKey: playerKeys.unassociated,
queryFn: getUnassociatedPlayers,
}),
};