Commit 62646853 authored by Steven's avatar Steven

chore: tweak comments display

parent ed66e0fe
...@@ -60,18 +60,15 @@ const MemoHeader: React.FC<MemoHeaderProps> = ({ ...@@ -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>
)} )}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment