From e652b2d7b135d114fcaf4750a17cc04a51911820 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Mon, 28 Oct 2024 17:52:07 +0200 Subject: [PATCH] Fix clipping issue with 2 image grid (#5744) * don't set aspect ratio for 2 images * let -> const --- src/view/com/util/images/ImageLayoutGrid.tsx | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/view/com/util/images/ImageLayoutGrid.tsx b/src/view/com/util/images/ImageLayoutGrid.tsx index 1aaf166ff2..7475a96c38 100644 --- a/src/view/com/util/images/ImageLayoutGrid.tsx +++ b/src/view/com/util/images/ImageLayoutGrid.tsx @@ -24,18 +24,7 @@ export function ImageLayoutGrid({style, ...props}: ImageLayoutGridProps) { : a.gap_2xs : a.gap_xs const count = props.images.length - let aspectRatio - switch (count) { - case 2: - aspectRatio = 2 - break - case 3: - aspectRatio = 2 - break - case 4: - aspectRatio = undefined - break - } + const aspectRatio = count === 3 ? 2 : undefined return (