diff --git a/apps/web/src/components/features/sheets/MessageAssumptions.stories.tsx b/apps/web/src/components/features/sheets/MessageAssumptions.stories.tsx index 49c7820a9..3e313bcf5 100644 --- a/apps/web/src/components/features/sheets/MessageAssumptions.stories.tsx +++ b/apps/web/src/components/features/sheets/MessageAssumptions.stories.tsx @@ -47,11 +47,7 @@ const MessageAssumptionsDemo = ({ - {}} - /> + ); }; diff --git a/apps/web/src/components/features/sheets/MessageAssumptions.tsx b/apps/web/src/components/features/sheets/MessageAssumptions.tsx index e54e4482f..8c2faea5c 100644 --- a/apps/web/src/components/features/sheets/MessageAssumptions.tsx +++ b/apps/web/src/components/features/sheets/MessageAssumptions.tsx @@ -11,16 +11,13 @@ import { confidenceTranslations, assumptionLabelTranslations } from '@/lib/messages/confidence-translations'; -import { ArrowUpRight } from '@/components/ui/icons'; -import { CircleCheck, OctagonWarning } from '@/components/ui/icons/NucleoIconFilled'; +import { CircleCheck, OctagonWarning } from '@/components/ui/icons'; import { Pill } from '@/components/ui/pills/Pill'; -import { cn } from '@/lib/classMerge'; type MessageAssumptionsProps = Pick< PostProcessingMessage, 'summary_message' | 'summary_title' | 'assumptions' | 'confidence_score' > & { - onClickAskDataTeam: () => void; useTrigger?: boolean; }; @@ -32,14 +29,7 @@ export interface MessageAssumptionsRef { export const MessageAssumptions = React.memo( forwardRef( ( - { - summary_message, - useTrigger = true, - onClickAskDataTeam, - summary_title, - assumptions = [], - confidence_score - }, + { summary_message, useTrigger = true, summary_title, assumptions = [], confidence_score }, ref ) => { const [open, setOpen] = useState(false); @@ -52,7 +42,7 @@ export const MessageAssumptions = React.memo( return ( ) : ( @@ -144,13 +133,11 @@ const AssumptionHeader = ({ const AssumptionSummary = ({ summary_message, summary_title, - confidence_score, - onClickAskDataTeam + confidence_score }: { summary_message: string; summary_title: string; confidence_score: ConfidenceScore; - onClickAskDataTeam: () => void; }) => { return (
@@ -165,14 +152,6 @@ const AssumptionSummary = ({ {summary_message} - -
); }; @@ -306,21 +285,19 @@ const AssumptionCard = ({ const Trigger: React.FC<{ onClick: () => void; confidence_score: ConfidenceScore; -}> = ({ onClick, confidence_score }) => { +}> = React.memo(({ onClick, confidence_score }) => { const isLow = confidence_score === 'low' || !confidence_score; const icon = isLow ? : ; return (
{icon}
); -}; +}); + +Trigger.displayName = 'Trigger'; diff --git a/apps/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatMessageOptions.tsx b/apps/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatMessageOptions.tsx index f09faf367..1ce101fea 100644 --- a/apps/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatMessageOptions.tsx +++ b/apps/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatMessageOptions.tsx @@ -62,10 +62,6 @@ export const ChatMessageOptions: React.FC<{ }); }); - const handleAskDataTeam = useMemoizedFn(() => { - console.log('ask data team'); - }); - return (
@@ -91,7 +87,7 @@ export const ChatMessageOptions: React.FC<{ {postProcessingMessage && ( - + )}