diff --git a/components/VendorStockBadge.tsx b/components/VendorStockBadge.tsx index a853db0..1a34486 100644 --- a/components/VendorStockBadge.tsx +++ b/components/VendorStockBadge.tsx @@ -9,10 +9,22 @@ interface VendorStockBadgeProps { } export const VendorStockBadge: React.FC = ({ asin, vendorStockMap, mode, avgWeeklySales }) => { - if (!vendorStockMap || !asin) return null; + if (!asin) return null; - const stockData = vendorStockMap.get(asin.toUpperCase()); - if (!stockData) return null; + const stockData = vendorStockMap?.get(asin.toUpperCase()); + + if (!stockData) { + return ( +
+
+ No Data +
+
+ - +
+
+ ); + } const stock = mode === 'uk' ? stockData.uk : stockData.eu;