mirror of
https://github.com/Jellify-Music/App.git
synced 2026-02-21 19:28:59 -06:00
adjust query for images
fix artist banner image
This commit is contained in:
@@ -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,
|
||||
});
|
||||
@@ -43,6 +43,7 @@ export default function Artist({
|
||||
alignContent="center">
|
||||
<YStack alignContent="center" justifyContent="center" minHeight={bannerHeight}>
|
||||
<BlurhashedImage
|
||||
borderRadius={0}
|
||||
item={artist}
|
||||
width={width}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user