From f8fb6625b23318a87da39dd13c93d044fad248d5 Mon Sep 17 00:00:00 2001 From: Alban Dumouilla Date: Thu, 21 Nov 2024 18:13:20 +0100 Subject: [PATCH] Integrate feedback --- .../components/ConversationMessageActions.tsx | 31 +++++++------------ 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/sparkle/src/components/ConversationMessageActions.tsx b/sparkle/src/components/ConversationMessageActions.tsx index 34fad9cf2ae9..b1404a127b52 100644 --- a/sparkle/src/components/ConversationMessageActions.tsx +++ b/sparkle/src/components/ConversationMessageActions.tsx @@ -213,12 +213,10 @@ function ConversationMessageThumbsSelector({ isSubmittingThumb, }: ConversationMessageThumbSelectorProps) { return ( - <> - - + ); } @@ -226,6 +224,10 @@ function ThumbsSelector({ isSubmittingThumb = false, onSubmitThumb, }: ConversationMessageThumbSelectorProps) { + const [selectedThumb, setSelectedThumb] = + React.useState(null); + const [feedback, setFeedback] = React.useState(null); + const [isPopoverOpen, setIsPopoverOpen] = React.useState(false); const containerRef = useRef(null); const selectThumb = async (thumb: ThumbReaction) => { @@ -240,34 +242,25 @@ function ThumbsSelector({ await onSubmitThumb({ thumb, isToRemove: false }); }; - const [selectedThumb, setSelectedThumb] = - React.useState(null); - const [feedback, setFeedback] = React.useState(null); - const [isPopoverOpen, setIsPopoverOpen] = React.useState(false); - return (