mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(catalog): large image size was incorrect
This commit is contained in:
@@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user