Fix: restore Top50 ranking badges (white/gradient) next to inventory badges across all views

This commit is contained in:
Christian Vidal Wolf
2026-04-27 11:33:07 +02:00
parent 9f8e51e2f3
commit 99e4b2c34b
8 changed files with 113 additions and 6 deletions
+12
View File
@@ -118,6 +118,18 @@ export const WeeklyRow: React.FC<WeeklyRowProps> = React.memo(({
{stockMap && (
<StockBadge stock={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