From 15646a898919f36fcab3f2f3d56affa8cabeb52d Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 5 Jan 2026 21:57:07 +0800 Subject: [PATCH] chore: fix linter --- web/src/components/MemoEditor/index.tsx | 4 +-- .../components/metadata/AttachmentCard.tsx | 11 ++----- .../components/metadata/AttachmentList.tsx | 1 - web/src/components/PreviewImageDialog.tsx | 6 +--- .../Settings/PreferencesSection.tsx | 5 +-- web/src/utils/attachment.ts | 31 ------------------- 6 files changed, 5 insertions(+), 53 deletions(-) diff --git a/web/src/components/MemoEditor/index.tsx b/web/src/components/MemoEditor/index.tsx index 9d6bfcd20..2aaee3971 100644 --- a/web/src/components/MemoEditor/index.tsx +++ b/web/src/components/MemoEditor/index.tsx @@ -54,9 +54,7 @@ const MemoEditorImpl: React.FC = ({ const { userGeneralSetting } = useAuth(); // Get default visibility from user settings - const defaultVisibility = userGeneralSetting?.memoVisibility - ? convertVisibilityFromString(userGeneralSetting.memoVisibility) - : undefined; + const defaultVisibility = userGeneralSetting?.memoVisibility ? convertVisibilityFromString(userGeneralSetting.memoVisibility) : undefined; useMemoInit(editorRef, memoName, cacheKey, currentUser?.name ?? "", autoFocus, defaultVisibility); diff --git a/web/src/components/MemoView/components/metadata/AttachmentCard.tsx b/web/src/components/MemoView/components/metadata/AttachmentCard.tsx index ce0efe758..2aadfb76c 100644 --- a/web/src/components/MemoView/components/metadata/AttachmentCard.tsx +++ b/web/src/components/MemoView/components/metadata/AttachmentCard.tsx @@ -1,6 +1,6 @@ import { cn } from "@/lib/utils"; import type { Attachment } from "@/types/proto/api/v1/attachment_service_pb"; -import { getAttachmentType, getAttachmentUrl, getColorspace } from "@/utils/attachment"; +import { getAttachmentType, getAttachmentUrl } from "@/utils/attachment"; interface AttachmentCardProps { attachment: Attachment; @@ -25,14 +25,7 @@ const AttachmentCard = ({ attachment, onClick, className }: AttachmentCardProps) } if (attachmentType === "video/*") { - return ( -