Fix: remove duplicated Top50 ranking badges, keep only leftmost instance

This commit is contained in:
Christian Vidal Wolf
2026-04-27 11:44:17 +02:00
parent 1fc494fc3f
commit e7f48af099
2 changed files with 3 additions and 15 deletions
-12
View File
@@ -125,18 +125,6 @@ export const WeeklyRow: React.FC<WeeklyRowProps> = 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 <Top50Badge rank={rank} label="EU" theme="indigo" />;
} else {
const rank = top50Ranking.uk.get(asin);
if (rank) return <Top50Badge rank={rank} label="UK" theme="blue" />;
}
}
return null;
})()}
<BuyBoxWarningBadge asin={asin} buyBoxLostMap={buyBoxLostMap} />
{experimentMap && (
<ExperimentBadge