From b5b5c5ca467e2b1c1695a37d43b0a9ad9adcd9ce Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Fri, 21 Jun 2024 10:40:51 +0200 Subject: [PATCH] fix(catalog): large image size was incorrect --- src/components/catalog-row/catalog-row.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/catalog-row/catalog-row.tsx b/src/components/catalog-row/catalog-row.tsx index 24f8d080..ba3e532f 100644 --- a/src/components/catalog-row/catalog-row.tsx +++ b/src/components/catalog-row/catalog-row.tsx @@ -34,8 +34,10 @@ export const CatalogPostMedia = ({ commentMediaInfo, isOutOfFeed, linkWidth, lin const handleError = () => setHasError(true); const loadingStyle = { display: isLoaded ? 'block' : 'none' }; + const { imageSize } = useCatalogStyleStore(); + let displayWidth, displayHeight; - const maxThumbnailSize = 150; + const maxThumbnailSize = imageSize === 'Large' ? 250 : 150; if (linkWidth && linkHeight) { let scale = Math.min(1, maxThumbnailSize / Math.max(linkWidth, linkHeight)); @@ -51,7 +53,6 @@ export const CatalogPostMedia = ({ commentMediaInfo, isOutOfFeed, linkWidth, lin displayHeight = 'unset'; } - const { imageSize } = useCatalogStyleStore(); const maxWidth = imageSize === 'Large' ? '250px' : '150px'; const maxHeight = imageSize === 'Large' ? '250px' : '150px';