From a00eb23fdf7b1cc15dc918fcffe8e98cbbb3017b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Mon, 20 Jul 2026 07:23:56 +0300 Subject: [PATCH] =?UTF-8?q?refactor:=20=E2=99=BB=EF=B8=8F=20note-file-prev?= =?UTF-8?q?iew=20Switch/Match=20replaces=20nested=20Show?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/notes/note-file-preview.tsx | 32 ++++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/components/notes/note-file-preview.tsx b/src/components/notes/note-file-preview.tsx index 6008c01..ba3f600 100644 --- a/src/components/notes/note-file-preview.tsx +++ b/src/components/notes/note-file-preview.tsx @@ -1,4 +1,4 @@ -import { Show, createEffect, createSignal, onCleanup } from "solid-js"; +import { Match, Show, Switch, createEffect, createSignal, onCleanup } from "solid-js"; import { formatApiError } from "@/api/client"; import { getNoteFileBlob } from "@/api/getNoteFileBlob"; import type { NoteFile } from "@/api/types"; @@ -77,20 +77,22 @@ export function NoteFilePreview(props: { noteId: string; file: NoteFile | null; fallback={
{t("notes.previewUnsupported")}
} >