import { useQuery } from "@tanstack/react-query";
import { valueBoardService } from "./service";

export const ValueBoardQueryKeys = {
  all: ["value-board"] as const,
  list: (sport?: string) =>
    [...ValueBoardQueryKeys.all, "list", sport] as const,
};

export const useValueBoard = (sport?: string) => {
  return useQuery({
    queryKey: ValueBoardQueryKeys.list(sport),
    queryFn: () => valueBoardService.getValueBoard(sport),
  });
};
