import React, { useState } from 'react'; import { useRouter } from 'next/router'; import { useQuery } from '@apollo/client'; import Head from 'next/head'; import Header from '@/components/Header'; import Footer from '@/components/Footer'; import VehicleSearchSection from '../../components/VehicleSearchSection'; import { GET_LAXIMO_CATALOG_INFO } from '@/lib/graphql'; import { LaximoCatalogInfo } from '@/types/laximo'; import MetaTags from '@/components/MetaTags'; import { getMetaByPath } from '@/lib/meta-config'; const VehicleSearchPage = () => { const router = useRouter(); const { brand } = router.query; const [searchType, setSearchType] = useState<'vin' | 'wizard' | 'parts' | 'plate'>('vin'); // Получаем информацию о каталоге const { data: catalogData, loading: catalogLoading } = useQuery<{ laximoCatalogInfo: LaximoCatalogInfo }>( GET_LAXIMO_CATALOG_INFO, { variables: { catalogCode: brand }, skip: !brand, errorPolicy: 'all' } ); if (catalogLoading) { return ( <> Поиск автомобиля - {brand}

Загружаем информацию о каталоге...