From e9ec411694b5797000617aa711da1e633720d5be Mon Sep 17 00:00:00 2001 From: zainab-119 Date: Mon, 26 Aug 2024 09:14:28 +0300 Subject: [PATCH] Moved hasActiveReply ternary condition outside of the class --- client/src/components/Chat.jsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/client/src/components/Chat.jsx b/client/src/components/Chat.jsx index ec5be720..89b92ad6 100644 --- a/client/src/components/Chat.jsx +++ b/client/src/components/Chat.jsx @@ -437,15 +437,20 @@ const Chat = () => { // is this message currently being replied? const hasActiveReply = currentReplyMessageId === id; + const activeReplyClass = hasActiveReply ? 'bg-[#FF9F1C]/25 border-[#FF9F1C]' : ''; + const activeReplySenderClass = hasActiveReply + ? isSender + ? 'border-r-[3.5px]' + : 'border-l-[3.5px]' + : ''; return (
{replyTo && (