diff --git a/package.json b/package.json index 19f3a48..4c0af67 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package", "name": "tutu", - "version": "1.0.8", + "version": "1.0.7", "description": "", "private": true, "type": "module", diff --git a/src/timelines/MediaAttachmentGrid.tsx b/src/timelines/MediaAttachmentGrid.tsx index 5748f0d..a88d7a6 100644 --- a/src/timelines/MediaAttachmentGrid.tsx +++ b/src/timelines/MediaAttachmentGrid.tsx @@ -51,19 +51,9 @@ const MediaAttachmentGrid: Component<{ setViewerIndex(index); }; - const columnCount = () => { - if (props.attachments.length === 1) { - return 1; - } else if (props.attachments.length % 2 === 0) { - return 2; - } else { - return 3; - } - }; - css` .attachments { - column-count: ${columnCount.toString()}; + column-count: ${(props.attachments.length === 1 ? 1 : 3).toString()}; } `; return ( @@ -114,17 +104,17 @@ const MediaAttachmentGrid: Component<{ /> ); case "gifv": // Later we can handle the preview - return ( -