import React from 'react'; import { STATS } from '../constants'; import { Link, useLocation } from 'react-router-dom'; interface HeroProps { title?: string; subtitle?: string; } const Hero: React.FC = ({ title, subtitle }) => { const location = useLocation(); const isEnglish = location.pathname.startsWith('/en'); const prefix = isEnglish ? '/en' : ''; return (
{/* Background Image Overlay */}
Construction Site
{/* Hero Content */}

{title || ( <> Инженерные изыскания и проектирование
для сложных и ответственных объектов )}

{subtitle || ( <> ООО «ГеоВектор» — полный комплекс инженерных изысканий и проектных решений для девелоперов, промышленных предприятий и госзаказчиков в России и других странах. )}

{isEnglish ? 'Request a project quote' : 'Рассчитать стоимость проекта'} {isEnglish ? 'Our services' : 'Наши услуги'}
{/* Stats */}
{STATS.map((stat, idx) => { const label = isEnglish ? idx === 0 ? 'For over 10 years we have been helping organisations deliver projects of any complexity.' : idx === 1 ? 'More than 20 major companies trust us with their projects.' : idx === 2 ? 'Over 30 successfully completed projects in the last 3 years.' : stat.label : stat.label; return (
{stat.value}

{label}

); })}
); }; export default Hero;