mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-23 19:48:44 -06:00
9 lines
485 B
TypeScript
9 lines
485 B
TypeScript
import { useQuery } from "@tanstack/react-query";
|
|
import { QueryKeys } from "../../enums/query-keys";
|
|
import { fetchItemImage } from "./functions/images";
|
|
import { ImageType } from "@jellyfin/sdk/lib/generated-client/models";
|
|
|
|
export const useItemImage = (itemId: string, imageType?: ImageType, width?: number, height?: number) => useQuery({
|
|
queryKey: [QueryKeys.ItemImage, itemId, imageType, width, height],
|
|
queryFn: () => fetchItemImage(itemId, imageType, width, height),
|
|
}); |