优化MessageRecord组件中的条件渲染逻辑,使用双重否定确保isOwn状态的正确判断。移除多余的换行以简化代码结构。

This commit is contained in:
超级老白兔
2025-11-14 18:54:04 +08:00
parent 4684e880b1
commit 1582e22756

View File

@@ -648,7 +648,7 @@ const MessageRecord: React.FC<MessageRecordProps> = ({ contract }) => {
</div>
</>
)}
{isOwn && (
{!!isOwn && (
<>
{/* Checkbox 显示控制 */}
{showCheckbox && (
@@ -659,7 +659,6 @@ const MessageRecord: React.FC<MessageRecordProps> = ({ contract }) => {
/>
</div>
)}
<Avatar
size={32}
src={currentCustomer?.avatar || ""}