chore: tweak comments display

This commit is contained in:
Steven 2026-01-06 19:08:03 +08:00
parent ed66e0fec2
commit 62646853eb
1 changed files with 3 additions and 6 deletions

View File

@ -60,18 +60,15 @@ const MemoHeader: React.FC<MemoHeaderProps> = ({
/> />
)} )}
{!isInMemoDetailPage && ( {!isInMemoDetailPage && commentAmount > 0 && (
<Link <Link
className={cn( className={cn("flex flex-row justify-start items-center rounded-md px-1 hover:opacity-80 gap-0.5")}
"flex flex-row justify-start items-center rounded-md px-1 hover:opacity-80 gap-0.5",
commentAmount === 0 && "hidden sm:group-hover:flex",
)}
to={`/${memo.name}#comments`} to={`/${memo.name}#comments`}
viewTransition viewTransition
state={{ from: parentPage }} state={{ from: parentPage }}
> >
<MessageCircleMoreIcon className="w-4 h-4 mx-auto text-muted-foreground" /> <MessageCircleMoreIcon className="w-4 h-4 mx-auto text-muted-foreground" />
{commentAmount > 0 && <span className="text-xs text-muted-foreground">{commentAmount}</span>} <span className="text-xs text-muted-foreground">{commentAmount}</span>
</Link> </Link>
)} )}