diff options
Diffstat (limited to 'src/view/com/util/images/ImageLayoutGrid.tsx')
-rw-r--r-- | src/view/com/util/images/ImageLayoutGrid.tsx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/view/com/util/images/ImageLayoutGrid.tsx b/src/view/com/util/images/ImageLayoutGrid.tsx index 830040ba6..9d6a49836 100644 --- a/src/view/com/util/images/ImageLayoutGrid.tsx +++ b/src/view/com/util/images/ImageLayoutGrid.tsx @@ -27,11 +27,10 @@ export function ImageLayoutGrid({style, ...props}: ImageLayoutGridProps) { ? a.gap_xs : a.gap_2xs : a.gap_xs - const count = props.images.length - const aspectRatio = count === 3 ? 2 : undefined + return ( <View style={style}> - <View style={[gap, a.rounded_md, a.overflow_hidden, {aspectRatio}]}> + <View style={[gap, a.rounded_md, a.overflow_hidden]}> <ImageLayoutGridInner {...props} gap={gap} /> </View> </View> @@ -78,14 +77,14 @@ function ImageLayoutGridInner(props: ImageLayoutGridInnerProps) { case 3: return ( <View style={[a.flex_1, a.flex_row, gap]}> - <View style={[a.flex_1]}> + <View style={[a.flex_1, {aspectRatio: 1}]}> <GalleryItem {...props} index={0} insetBorderStyle={noCorners(['topRight', 'bottomRight'])} /> </View> - <View style={[a.flex_1, gap]}> + <View style={[a.flex_1, {aspectRatio: 1}, gap]}> <View style={[a.flex_1]}> <GalleryItem {...props} |