diff --git a/src/timelines/MediaAttachmentGrid.tsx b/src/timelines/MediaAttachmentGrid.tsx index 625e0ab..682767a 100644 --- a/src/timelines/MediaAttachmentGrid.tsx +++ b/src/timelines/MediaAttachmentGrid.tsx @@ -3,6 +3,8 @@ import { type Component, For, Index, + Match, + Switch, createMemo, createRenderEffect, createSignal, @@ -147,9 +149,10 @@ const MediaAttachmentGrid: Component<{ > {(item, index) => { - switch (item().type) { - case "image": - return ( + const itemType = () => item().type; + return ( + + - ); - case "video": - return ( + + + + - ); - case "unknown": - return
; - } +
+
+ ); }}