import React, { useState } from 'react'; import { groupProjectsByCategory } from '../constants'; import { MapPin, ChevronDown } from 'lucide-react'; import { Link, useLocation } from 'react-router-dom'; const Projects: React.FC = () => { const location = useLocation(); const isEnglish = location.pathname.startsWith('/en'); const prefix = isEnglish ? '/en' : ''; const categories = groupProjectsByCategory().slice(0, 3); // Показываем только 3 категории const [openCategories, setOpenCategories] = useState<{ [key: string]: boolean }>({ [categories[0]?.name]: true // Открываем первую категорию по умолчанию }); const toggleCategory = (categoryName: string) => { setOpenCategories(prev => ({ ...prev, [categoryName]: !prev[categoryName] })); }; return (

{isEnglish ? 'Our recent projects' : 'Наши недавние проекты'}

{isEnglish ? 'Our team treats every project with great responsibility. Thank you for your trust.' : 'Наша команда всегда ответственно относится к проектам, которые вы нам доверили. Спасибо, что вы рядом.'}

{categories.map((category) => { const categoryName = isEnglish ? (() => { switch (category.name) { case 'Нефтегазовая промышленность': return 'Oil & gas industry'; case 'Коммерческая недвижимость и туризм': return 'Commercial real estate and tourism'; case 'Прочие объекты': return 'Other facilities'; default: return category.name; } })() : category.name; return (
{/* Заголовок категории */} {/* Список проектов (показываем только первые 3) */}
{category.projects.slice(0, 3).map((project, index) => { const title = isEnglish ? (() => { switch (project.title) { case 'ОАО «Газпромнефть-ОНПЗ»': return '“Gazpromneft‑ONPZ” OJSC'; case 'ООО «Петон»': return '“Peton” LLC'; case 'ОАО «Гипротрубопровод»': return '“Giprotuboprovod” OJSC'; default: return project.title; } })() : project.title; const description = isEnglish ? (() => { switch (project.title) { case 'ОАО «Газпромнефть-ОНПЗ»': return 'Modernisation of unit 19/3 at Gazpromneft‑ONPZ in Omsk.'; case 'ООО «Петон»': return 'L‑24/9. Technical upgrade. Heat recovery of diesel fuel hydrotreating unit (design and working documentation) at the Gazpromneft‑ONPZ site.'; case 'ОАО «Гипротрубопровод»': return 'Reconstruction of the production base in Omsk.'; // Commercial real estate and tourism (examples) case 'ООО «СУ-1 ОАО «Госстрой»': return 'Fast‑food restaurant “KFC” at the intersection of Marshala Zhukova and Akademika Korolyova streets in the Oktyabrsky district of Ufa.'; case 'ООО «Башкирский птицеводческий комплекс имени М. Гафури»': return 'Architectural civil facility “Administrative and utility building” for the Bashkir Poultry Complex named after M. Gafuri.'; case 'ООО «Регион-Ресурс»': return 'Construction of an eco‑tourism centre in the Kirovsky district of Ufa, Republic of Bashkortostan, including development of design documentation, support through expert review and approvals.'; case 'МБУ «Управление пожарной охраны ГО г. Уфа Республики Башкортостан': return 'Fire station building with four bays located in the Leninsky district, settlement 8 Marta, Republic of Bashkortostan.'; case 'ООО «Управление капитального строительства «Монолитстрой»': return 'Administrative, retail and entertainment complex in the Dema‑9 neighbourhood, Demsky district of Ufa, Republic of Bashkortostan.'; case 'ОАО «Уфимский хлопчатобумажный комбинат»': return '“Ferris wheel‑58” on the site of the Ufa Cotton Mill at 137 Mendeleeva Street, Ufa.'; case 'ЗАО «Штрабаг»': return 'Technology park of energy‑efficient technologies on a land plot within the administrative boundaries of the Ufimsky municipal district, Republic of Bashkortostan.'; case 'ООО «Уралстройсервис»': return 'Underground garage with public service premises on the roof, at Rossiyskaya Street and Davletkildeyev Boulevard intersection in the Oktyabrsky district of Ufa.'; case 'ООО «РаушБиер»': return 'Two‑storey restaurant complex located at 8 Tukaeva Street, Tuymazy, Republic of Bashkortostan.'; case 'ООО СОК «Трамплин»': return 'Ski tow lift in the Oktyabrsky district of Ufa, Republic of Bashkortostan.'; default: return project.description; } })() : project.description; return (
{index + 1}

{title}

{description}
)})}
)})}
{isEnglish ? 'View all projects' : 'Смотреть все проекты'}
); }; export default Projects;