about summary refs log tree commit diff
path: root/src/view/com/util/images/ImageLayoutGrid.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com/util/images/ImageLayoutGrid.tsx')
-rw-r--r--src/view/com/util/images/ImageLayoutGrid.tsx13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/view/com/util/images/ImageLayoutGrid.tsx b/src/view/com/util/images/ImageLayoutGrid.tsx
index 1aaf166ff..7475a96c3 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 (
     <View style={style}>
       <View style={[gap, a.rounded_md, a.overflow_hidden, {aspectRatio}]}>