From 4208b9440174309e3fe81df15ca981d58a03dc13 Mon Sep 17 00:00:00 2001 From: Dylan De Faoite Date: Tue, 10 Feb 2026 14:20:58 +0000 Subject: [PATCH] feat(frontend): improve top emotion card styling --- frontend/src/components/EmotionalStats.tsx | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/EmotionalStats.tsx b/frontend/src/components/EmotionalStats.tsx index 62b9605..07b2eea 100644 --- a/frontend/src/components/EmotionalStats.tsx +++ b/frontend/src/components/EmotionalStats.tsx @@ -33,6 +33,11 @@ const EmotionalStats = ({contentData}: EmotionalStatsProps) => { }; }); + const formatEmotion = (value: string) => { + if (!value) return "Unknown"; + return value.charAt(0).toUpperCase() + value.slice(1); + }; + if (!rows.length) { return (
@@ -53,10 +58,19 @@ const EmotionalStats = ({contentData}: EmotionalStatsProps) => { {strongestPerTopic.map((topic) => (

{topic.topic}

-
Top emotion: {topic.emotion}
-

Model Confidence: {topic.value.toFixed(3)}

-
- Based on {topic.count} events +
+ Top Emotion +
+
+ {formatEmotion(topic.emotion)} +
+
+ Confidence + {topic.value.toFixed(3)} +
+
+ Sample Size + {topic.count} events
))}