10 lines
265 B
TypeScript
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,
|
|
});
|
|
}; |