adjust query for images

fix artist banner image
This commit is contained in:
Violet Caulfield
2025-02-11 13:32:23 -06:00
parent e37bc543d9
commit f7c58c4dcc
2 changed files with 2 additions and 2 deletions

View File

@@ -2,7 +2,6 @@ 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";
import { queryClient } from "@/constants/query-client";
import { QueryConfig } from "./query.config";
export const useItemImage = (itemId: string, imageType: ImageType = ImageType.Primary, width: number = 150, height: number = 150) => useQuery({
@@ -14,6 +13,6 @@ export const useItemImage = (itemId: string, imageType: ImageType = ImageType.Pr
Math.ceil(height / 100) * 100 // So these keys need to match
],
queryFn: () => fetchItemImage(itemId, imageType, width, height),
retry: 3,
retry: 2,
staleTime: QueryConfig.staleTime.oneDay,
});

View File

@@ -43,6 +43,7 @@ export default function Artist({
alignContent="center">
<YStack alignContent="center" justifyContent="center" minHeight={bannerHeight}>
<BlurhashedImage
borderRadius={0}
item={artist}
width={width}
/>