fix: TypeScript null check in StockStatusBadge
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

- Use != null to handle both null and undefined for optional daysUntilOOS prop

🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
Kelly
2025-12-17 02:33:07 -07:00
parent 1d254238f3
commit e8e7261409

View File

@@ -38,10 +38,10 @@ export function StockStatusBadge({
if (!inStock) {
bgColor = 'bg-red-600';
label = 'Out of Stock';
} else if (daysUntilOOS !== null && daysUntilOOS <= 3) {
} else if (daysUntilOOS != null && daysUntilOOS <= 3) {
bgColor = 'bg-orange-600';
label = `Low (${daysUntilOOS}d)`;
} else if (daysUntilOOS !== null && daysUntilOOS <= 7) {
} else if (daysUntilOOS != null && daysUntilOOS <= 7) {
bgColor = 'bg-yellow-600';
textColor = 'text-black';
label = `Moderate (${daysUntilOOS}d)`;