Files
fltr-app/hooks/useShow.ts
2025-10-29 20:50:21 +11:00

10 lines
265 B
TypeScript

import { useQuery } from "@tanstack/react-query";
import { getShowById } from "@/apis/showApi";
export const useShow = (showId: number) => {
return useQuery({
queryKey: ["show", showId],
queryFn: () => getShowById(showId),
enabled: !!showId,
});
};