From 90d498f5f931975b674536fbe102dbc22d997d2d Mon Sep 17 00:00:00 2001 From: ZLX Date: Mon, 9 Feb 2026 20:02:13 +0800 Subject: [PATCH] fix: restore comment icon visibility for memos with no comments The comment icon in MemoHeader was completely hidden when commentAmount was 0 due to conditional rendering (introduced in 62646853). This restores the previous behavior where the icon is rendered but hidden via CSS, appearing on hover (desktop) so users can navigate to the detail page to write the first comment. Fixes #5592 Co-Authored-By: Claude Opus 4.6 --- .gitignore | 3 +++ web/src/components/MemoView/components/MemoHeader.tsx | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index abd9d94fc..24a9821a3 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,6 @@ dist # Git worktrees .worktrees/ + +# Claude Code +CLAUDE.md diff --git a/web/src/components/MemoView/components/MemoHeader.tsx b/web/src/components/MemoView/components/MemoHeader.tsx index 7a58d0e1e..40874fdf9 100644 --- a/web/src/components/MemoView/components/MemoHeader.tsx +++ b/web/src/components/MemoView/components/MemoHeader.tsx @@ -52,15 +52,18 @@ const MemoHeader: React.FC = ({ showCreator, showVisibility, sh /> )} - {!isInMemoDetailPage && commentAmount > 0 && ( + {!isInMemoDetailPage && ( - {commentAmount} + {commentAmount > 0 && {commentAmount}} )}