fix(landing): счётчик продуктов подменяет только числовую плашку, а не «AI — в каждом продукте»

This commit is contained in:
admin
2026-09-25 19:18:23 +03:00
parent c4e5a532a1
commit 8ebc42dd09
+2 -1
View File
@@ -182,7 +182,8 @@ export function Landing() {
{Array.isArray(hero?.stats) && hero.stats.length > 0 && (
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 mt-14 pt-7 border-t border-slate-200">
{hero.stats.map((stat: any, idx: number) => {
const isProd = typeof stat.label === 'string' && stat.label.toUpperCase().includes('ПРОДУКТ');
// Подменяем только счётчик продуктов (число), а не любую подпись со словом «продукт»
const isProd = typeof stat.label === 'string' && /^\d+$/.test(String(stat.value).trim()) && stat.label.toUpperCase().includes('ПРОДУКТ');
const value = isProd ? String(productCount) : stat.value;
const label = isProd ? pluralProducts(productCount) : stat.label;
return (