import React, { useState, useEffect } from 'react'; import PageHeader from '../components/PageHeader'; import { FileText, X, ChevronLeft, ChevronRight } from 'lucide-react'; interface Certificate { id: number; image: string; title: string; } interface CertificateSection { title: string; certificates: Certificate[]; } const CertificatesPage: React.FC = () => { const [selectedImageIndex, setSelectedImageIndex] = useState(null); const sections: CertificateSection[] = [ { title: 'ПРОГРАММНЫЕ ПРОДУКТЫ КРЕДО', certificates: [ { id: 1, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Сертификат' } ] }, { title: 'ВЫПИСКА ИЗ СРО ПО СТРОИТЕЛЬСТВУ', certificates: [ { id: 2, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 1' }, { id: 3, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 2' }, { id: 4, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 3' }, { id: 5, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 4' } ] }, { title: 'ВЫПИСКА ИЗ СРО ПО ПРОЕКТИРОВАНИЮ', certificates: [ { id: 6, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 1' }, { id: 7, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 2' } ] }, { title: 'ВЫПИСКА ИЗ СРО ПО ИЗЫСКАНИЯМ', certificates: [ { id: 8, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 1' }, { id: 9, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 2' } ] }, { title: 'ВЫПИСКА ИЗ РЕЕСТРА ЧЛЕНОВ САМОРЕГУЛИРУЕМОЙ ОРГАНИЗАЦИИ, ОСНОВАННОЙ НА ЧЛЕНСТВЕ ЛИЦ, ОСУЩЕСТВЛЯЮЩИХ СТРОИТЕЛЬСТВО', certificates: [ { id: 10, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 1' }, { id: 11, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 2' }, { id: 12, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 3' } ] }, { title: 'ВЫПИСКА ИЗ РЕЕСТРА ЧЛЕНОВ САМОРЕГУЛИРУЕМОЙ ОРГАНИЗАЦИИ, ОСНОВАННОЙ НА ЧЛЕНСТВЕ ЛИЦ, ОСУЩЕСТВЛЯЮЩИХ ИНЖЕНЕРНЫЕ ИЗЫСКАНИЯ', certificates: [ { id: 13, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 1' }, { id: 14, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 2' } ] }, { title: 'ВЫПИСКА ИЗ РЕЕСТРА ЧЛЕНОВ САМОРЕГУЛИРУЕМОЙ ОРГАНИЗАЦИИ, ОСНОВАННОЙ НА ЧЛЕНСТВЕ ЛИЦ, ОСУЩЕСТВЛЯЮЩИХ ПРОЕКТНЫЕ РАБОТЫ', certificates: [ { id: 15, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 1' }, { id: 16, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 2' } ] }, { title: 'СВЕДЕНИЕ НА ОСУЩЕСТВЛЕНИЕ ГЕОДЕЗИЧЕСКОЙ И КАРТОГРАФИЧЕСКОЙ ДЕЯТЕЛЬНОСТИ ФЕДЕРАЛЬНАЯ СЛУЖБА ГОСУДАРСТВА', certificates: [ { id: 17, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 1' }, { id: 18, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 2' } ] }, { title: 'СВИДЕТЕЛЬСТВО О ПРОХОЖДЕНИИ ИСПЫТАНИЙ И КОНТРОЛЯ ПО ISO 9001', certificates: [ { id: 19, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 1' }, { id: 20, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 2' }, { id: 21, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 3' }, { id: 22, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 4' }, { id: 23, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 5' }, { id: 24, image: 'https://placehold.co/400x600/94a3b8/white', title: 'Документ 6' } ] } ]; // Создаем плоский массив всех изображений для навигации const allImages = sections.flatMap(section => section.certificates.map(cert => cert.image)); const openModal = (image: string) => { const index = allImages.indexOf(image); setSelectedImageIndex(index); document.body.style.overflow = 'hidden'; }; const closeModal = () => { setSelectedImageIndex(null); document.body.style.overflow = 'auto'; }; const nextImage = () => { if (selectedImageIndex !== null) { setSelectedImageIndex((selectedImageIndex + 1) % allImages.length); } }; const prevImage = () => { if (selectedImageIndex !== null) { setSelectedImageIndex((selectedImageIndex - 1 + allImages.length) % allImages.length); } }; // Обработка клавиатуры useEffect(() => { const handleKeyDown = (e: KeyboardEvent) => { if (selectedImageIndex === null) return; if (e.key === 'Escape') { closeModal(); } else if (e.key === 'ArrowRight') { nextImage(); } else if (e.key === 'ArrowLeft') { prevImage(); } }; window.addEventListener('keydown', handleKeyDown); return () => window.removeEventListener('keydown', handleKeyDown); }, [selectedImageIndex]); return (

СВИДЕТЕЛЬСТВА

{/* Секции с сертификатами */}
{sections.map((section, sectionIndex) => (
{/* Заголовок секции */}

{section.title}

{/* Сетка документов */}
{section.certificates.map((cert) => (
openModal(cert.image)} className="group cursor-pointer" >
{cert.title}
{/* Overlay при наведении */}
Увеличить
))}
))}
{/* Информационный блок */}

Гарантия качества

ООО «ГЕОВЕКТОР» имеет все необходимые лицензии и сертификаты для осуществления деятельности в области проектирования, строительства и инженерных изысканий. Наша компания является членом саморегулируемых организаций и соответствует международным стандартам качества ISO 9001.

СРО
Член организации
ISO 9001
Сертифицирован
10+ лет
На рынке
{/* Модальное окно для просмотра изображения */} {selectedImageIndex !== null && (
{/* Кнопка закрытия */} {/* Кнопка "Назад" */} {/* Кнопка "Вперед" */} {/* Индикатор */}
{selectedImageIndex + 1} / {allImages.length}
{/* Изображение */}
e.stopPropagation()} > {`Документ
)}
); }; export default CertificatesPage;