diff --git a/.forgejo/workflows/depoly.yml b/.forgejo/workflows/depoly.yml index 9ae7044..b541fa0 100644 --- a/.forgejo/workflows/depoly.yml +++ b/.forgejo/workflows/depoly.yml @@ -31,12 +31,16 @@ jobs: run: bun install - name: Build Dist (Staging) - run: VITE_CODE_VERSION=$GITHUB_SHA bun dist -m staging + run: bun dist -m staging if: env.GITHUB_REF_NAME == 'master' + env: + VITE_CODE_VERSION: ${{ env.GITHUB_SHA }} - name: Build Dist - run: VITE_CODE_VERSION=$GITHUB_SHA bun dist + run: bun dist if: env.GITHUB_REF_NAME != 'master' + env: + VITE_CODE_VERSION: ${{ env.GITHUB_SHA }} - name: Depoly to Preview uses: https://github.com/cloudflare/wrangler-action@v3 diff --git a/src/timelines/MediaAttachmentGrid.tsx b/src/timelines/MediaAttachmentGrid.tsx index 682767a..625e0ab 100644 --- a/src/timelines/MediaAttachmentGrid.tsx +++ b/src/timelines/MediaAttachmentGrid.tsx @@ -3,8 +3,6 @@ import { type Component, For, Index, - Match, - Switch, createMemo, createRenderEffect, createSignal, @@ -149,10 +147,9 @@ const MediaAttachmentGrid: Component<{ > {(item, index) => { - const itemType = () => item().type; - return ( - - + switch (item().type) { + case "image": + return ( - - + ); + case "video": + return ( - + ); + case "gifv": + return ( - + ); + + case "audio": + return ( - - - ); + ); + case "unknown": + return
; + } }}