From 55c91a7bfc1f4f2d78c1599c2f34c25bd01b92a4 Mon Sep 17 00:00:00 2001 From: "christian.vidal" Date: Thu, 29 Jan 2026 20:19:13 +0100 Subject: [PATCH] Remove decimals from Dashboard and fix BuyBox badge layout --- components/BuyBoxWarningBadge.tsx | 6 +++--- components/Dashboard.tsx | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/components/BuyBoxWarningBadge.tsx b/components/BuyBoxWarningBadge.tsx index 467712b..549df81 100644 --- a/components/BuyBoxWarningBadge.tsx +++ b/components/BuyBoxWarningBadge.tsx @@ -27,10 +27,10 @@ export const BuyBoxWarningBadge: React.FC = ({ asin, bu onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} > -
- ⚠️ +
+ ⚠️ BB Lost - {data.countries.join(', ')} + {data.countries.slice(0, 3).join(', ')}{data.countries.length > 3 ? '...' : ''}
{/* Hover Popup */} diff --git a/components/Dashboard.tsx b/components/Dashboard.tsx index 4a00aed..cb96770 100644 --- a/components/Dashboard.tsx +++ b/components/Dashboard.tsx @@ -91,7 +91,9 @@ const MultiYearKPICard: React.FC<{ const formatValue = (val: number) => { if (metric === 'sellOut') { - return `€${val.toLocaleString('de-DE', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`; + if (metric === 'sellOut') { + return `€${val.toLocaleString('de-DE', { minimumFractionDigits: 0, maximumFractionDigits: 0 })}`; + } } return val.toLocaleString('de-DE'); }; @@ -166,7 +168,7 @@ const MultiYearKPICard: React.FC<{ {contextGrowthElement} {/* Share of Line % */} - {((currentValue / contextValue) * 100).toFixed(1)}% Share + {((currentValue / contextValue) * 100).toFixed(0)}% Share
@@ -424,7 +426,7 @@ const GrowthTable: React.FC<{ = 0 ? 'bg-emerald-500/10 text-emerald-400' : 'bg-red-500/10 text-red-400'}`}> - {item.sellOutGrowthPercentage.toFixed(1)}% + {item.sellOutGrowthPercentage.toFixed(0)}% @@ -436,7 +438,7 @@ const GrowthTable: React.FC<{ = 0 ? 'bg-violet-500/10 text-violet-400' : 'bg-orange-500/10 text-orange-400'}`}> - {item.unitsGrowthPercentage.toFixed(1)}% + {item.unitsGrowthPercentage.toFixed(0)}%