From e7f48af0992df6fe3b0eb929e7d8cfca8cb3f92e Mon Sep 17 00:00:00 2001 From: Christian Vidal Wolf Date: Mon, 27 Apr 2026 11:44:17 +0200 Subject: [PATCH] Fix: remove duplicated Top50 ranking badges, keep only leftmost instance --- components/DataGrid.tsx | 6 +++--- components/WeeklyRow.tsx | 12 ------------ 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/components/DataGrid.tsx b/components/DataGrid.tsx index 34f7f0e..ec42931 100644 --- a/components/DataGrid.tsx +++ b/components/DataGrid.tsx @@ -1374,7 +1374,7 @@ const DataGrid: React.FC = ({ data, filters, hasCustomerFilter, a {paginatedRows.map((row) => ( - {effectiveDimensions.map(dim => ( + {effectiveDimensions.map((dim, dimIdx) => ( {dim === 'title' ?
@@ -1387,7 +1387,7 @@ const DataGrid: React.FC = ({ data, filters, hasCustomerFilter, a {stockMap && ( )} - {(() => { + {dimIdx === 0 && (() => { const asin = (row.asin || '').trim().toUpperCase(); if (asin && top50Ranking) { if (top50Mode === 'eu') { @@ -1411,7 +1411,7 @@ const DataGrid: React.FC = ({ data, filters, hasCustomerFilter, a
: dim === 'asin' || dim === 'sku' ?
- {(() => { + {dimIdx === 0 && (() => { const asin = (row.asin || '').trim().toUpperCase(); if (asin && top50Ranking) { if (top50Mode === 'eu') { diff --git a/components/WeeklyRow.tsx b/components/WeeklyRow.tsx index f76af74..f933b61 100644 --- a/components/WeeklyRow.tsx +++ b/components/WeeklyRow.tsx @@ -125,18 +125,6 @@ export const WeeklyRow: React.FC = React.memo(({ avgWeeklySales={velocityMap?.get(asin)} internalStock={stockMap?.get(row.sku?.replace(/(DE|EN)$/i, ''))} /> - {(() => { - if (asin && top50Ranking) { - if (top50Mode === 'eu') { - const rank = top50Ranking.eu.get(asin); - if (rank) return ; - } else { - const rank = top50Ranking.uk.get(asin); - if (rank) return ; - } - } - return null; - })()} {experimentMap && (