fix: move BuyBoxWarningBadge inside stockMap block to prevent duplication

The badge was rendered outside the stockMap conditional, causing it to
appear independently of the Amazon stock badge. Now it's grouped inside
the block, always appearing immediately next to VendorStockBadge.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Christian Vidal Wolf
2026-03-09 10:23:28 +01:00
co-authored by Claude Sonnet 4.6
parent 826688a3f6
commit 507af94e1a
+1 -1
View File
@@ -1388,9 +1388,9 @@ const DataGrid: React.FC<DataGridProps> = ({ data, filters, hasCustomerFilter, a
<>
<StockBadge stock={stockMap.get(row.sku?.replace(/(DE|EN)$/i, ''))} />
<VendorStockBadge asin={row.asin} vendorStockMap={vendorStockMap} mode={top50Mode} avgWeeklySales={velocityMap?.get(row.asin.trim().toUpperCase())} />
<BuyBoxWarningBadge asin={row.asin} buyBoxLostMap={buyBoxLostMap} />
</>
)}
<BuyBoxWarningBadge asin={row.asin} buyBoxLostMap={buyBoxLostMap} />
</div>
: dim === 'asin' || dim === 'sku'
? <div className="flex items-center gap-2 min-w-max">