Add blurhash support to cards #153

This commit is contained in:
Prayag Prajapati committed 2023-08-29 23:42:07 +05:30
1 parent 821090612e
commit 7dd5fd89f8
8 files changed
+197 -110

No files matched your search

+11
View File
@@ -48,6 +48,7 @@ export const Card = ({
isFavorite,
isPlayed,
imageType = "Primary",
imageBlurhash,
cardType,
secondaryText,
queryKey,
@@ -97,6 +98,16 @@ export const Card = ({
width: "100%",
}}
>
{!!imageBlurhash && (
<Blurhash
hash={imageBlurhash}
width={128}
height={128}
resolutionX={24}
resolutionY={24}
className="card-image-blurhash"
/>
)}
<Box className="card-image-icon-container">
{TypeIconCollectionCard[itemType]}
</Box>