Skip to content

Commit abe7ce6

Browse files
committed
refactor: change nickname render logic, make sure its has a placeholder to avoid hover blink
1 parent 74d843d commit abe7ce6

File tree

1 file changed

+1
-1
lines changed
  • client/web/src/components/ChatBox/ChatMessageList

1 file changed

+1
-1
lines changed

client/web/src/components/ChatBox/ChatMessageList/Item.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export const NormalMessage: React.FC<ChatMessageItemProps> = React.memo(
136136
{showAvatar && (
137137
<div className="flex items-center">
138138
<div className="font-bold">
139-
{userInfo.nickname ?? <span>&nbsp;</span>}
139+
{userInfo.nickname || <span>&nbsp;</span>}
140140
</div>
141141
<div className="hidden group-hover:block opacity-40 ml-1 text-sm">
142142
{formatShortTime(payload.createdAt)}

0 commit comments

Comments
 (0)