From 143854fa8164053d834120605784f83bf01ef339 Mon Sep 17 00:00:00 2001 From: Hanzalah Waheed Date: Wed, 13 Aug 2025 02:11:47 +0400 Subject: [PATCH] fix: show both like and dislike buttons --- .../src/conversation/ConversationBubble.tsx | 39 +++++++------------ 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/frontend/src/conversation/ConversationBubble.tsx b/frontend/src/conversation/ConversationBubble.tsx index 38d4053f..0d708cd6 100644 --- a/frontend/src/conversation/ConversationBubble.tsx +++ b/frontend/src/conversation/ConversationBubble.tsx @@ -565,16 +565,9 @@ const ConversationBubble = forwardRef<
{retryBtn}
)} - {handleFeedback && ( + {handleFeedback && type !== 'ERROR' && ( <> -
+
{ if (feedback === undefined || feedback === null) { handleFeedback?.('LIKE'); @@ -598,6 +587,10 @@ const ConversationBubble = forwardRef< handleFeedback?.(null); setIsLikeClicked(false); setIsDislikeClicked(false); + } else if (feedback === 'DISLIKE') { + handleFeedback?.('LIKE'); + setIsDislikeClicked(false); + setIsLikeClicked(true); } }} onMouseEnter={() => setIsLikeHovered(true)} @@ -607,13 +600,7 @@ const ConversationBubble = forwardRef<
-
+
{ if (feedback === undefined || feedback === null) { handleFeedback?.('DISLIKE'); @@ -637,6 +620,10 @@ const ConversationBubble = forwardRef< handleFeedback?.(null); setIsLikeClicked(false); setIsDislikeClicked(false); + } else if (feedback === 'LIKE') { + handleFeedback?.('DISLIKE'); + setIsDislikeClicked(true); + setIsLikeClicked(false); } }} onMouseEnter={() => setIsDislikeHovered(true)}