import React from 'react'; import { useLocation } from 'react-router-dom'; import { BENEFITS } from '../constants'; const Benefits: React.FC = () => { const location = useLocation(); const isEnglish = location.pathname.startsWith('/en'); const descriptions = BENEFITS.map((item) => { if (!isEnglish) return item.description; switch (item.title) { case 'Надежность': return 'A reliable company ranked among the top 10 in Russia.'; case 'Опыт': return 'Experienced engineers with 10+ years of hands-on practice.'; case 'Поддержка': return 'Direct communication and support from our specialists 24/7.'; case 'Условия': return 'Tailored proposals and flexible terms of cooperation.'; default: return item.description; } }); return (
{isEnglish ? 'WHO WE WORK WITH' : 'Для кого мы работаем'}

{isEnglish ? 'For business and public sector clients' : 'Для бизнеса и государственных заказчиков'}

{isEnglish ? 'We help developers, industrial companies and public authorities solve complex engineering challenges and take responsibility for the final result.' : 'Мы работаем с девелоперами, промышленными компаниями и государственными организациями, беря на себя сложные инженерные задачи и ответственность за результат.'}

{BENEFITS.map((item, index) => (

{descriptions[index]}

))}
); }; export default Benefits;