This commit is contained in:
2026-01-30 00:17:46 +01:00
parent 51565fdf41
commit 14b2f83971
121 changed files with 121 additions and 43 deletions

View File

@@ -191,7 +191,12 @@ async function loadProductsFromExcelAndMdx(locale: 'en' | 'de'): Promise<Product
locale,
categories: (mdx?.categories || []).map(name => ({ name })),
attributes: [],
voltageType: data.voltageType,
voltageType: (() => {
const cats = (mdx?.categories || []).map(c => String(c));
const isMV = cats.some(c => /medium[-\s]?voltage|mittelspannung/i.test(c));
if (isMV && data.voltageType === 'high-voltage') return 'medium-voltage';
return data.voltageType;
})(),
});
});