diff --git a/src/components/BestPriceItem.tsx b/src/components/BestPriceItem.tsx index 5912da9..95c8885 100644 --- a/src/components/BestPriceItem.tsx +++ b/src/components/BestPriceItem.tsx @@ -39,7 +39,7 @@ const BestPriceItem: React.FC = ({ />
{discount}
-
+
{price}
{oldPrice}
diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 5c0de30..88ce715 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -157,20 +157,20 @@ const Header: React.FC = ({ onOpenAuthModal = () => console.log('Au }, []); // Скрытие top_head при скролле - useEffect(() => { - const topHead = document.querySelector('.top_head'); - if (!topHead) return; - const onScroll = () => { - if (window.scrollY > 0) { - topHead.classList.add('hide-top-head'); - } else { - topHead.classList.remove('hide-top-head'); - } - }; - window.addEventListener('scroll', onScroll); - onScroll(); - return () => window.removeEventListener('scroll', onScroll); - }, []); + // useEffect(() => { + // const topHead = document.querySelector('.top_head'); + // if (!topHead) return; + // const onScroll = () => { + // if (window.scrollY > 0) { + // topHead.classList.add('hide-top-head'); + // } else { + // topHead.classList.remove('hide-top-head'); + // } + // }; + // window.addEventListener('scroll', onScroll); + // onScroll(); + // return () => window.removeEventListener('scroll', onScroll); + // }, []); // Проверяем, является ли строка VIN номером const isVinNumber = (query: string): boolean => { @@ -358,7 +358,7 @@ const Header: React.FC = ({ onOpenAuthModal = () => console.log('Au return ( <> -
+ {/*
@@ -381,11 +381,34 @@ const Header: React.FC = ({ onOpenAuthModal = () => console.log('Au
- + */}
-
+ + + + + + + + + + + + + + + + + + + + + + + +
setMenuOpen((open) => !open)} @@ -398,7 +421,7 @@ const Header: React.FC = ({ onOpenAuthModal = () => console.log('Au
-
+
{ const [authModalOpen, setAuthModalOpen] = useState(false); @@ -30,7 +31,10 @@ const Layout = ({ children }: { children: React.ReactNode }) => { onSuccess={handleAuthSuccess} /> -
{children}
+ +
+ + {children}
setAuthModalOpen(true)} /> ); diff --git a/src/components/index/IndexTopMenuNav.tsx b/src/components/index/IndexTopMenuNav.tsx index 0ba236c..1b5ee50 100644 --- a/src/components/index/IndexTopMenuNav.tsx +++ b/src/components/index/IndexTopMenuNav.tsx @@ -1,27 +1,28 @@ import React from 'react'; +import Link from 'next/link'; const IndexTopMenuNav = () => (
- +
О компании
-
- + +
Оплата и доставка
-
- + +
Гарантия и возврат
-
- + +
Покупателям
-
- + +
Оптовым клиентам
-
- + +
Контакты
-
+
Новые поступления товаров
diff --git a/src/components/index/SupportVinSection.tsx b/src/components/index/SupportVinSection.tsx index 0c4bb32..daea04e 100644 --- a/src/components/index/SupportVinSection.tsx +++ b/src/components/index/SupportVinSection.tsx @@ -3,12 +3,12 @@ import React from "react"; const SupportVinSection: React.FC = () => (
- Поддержка: помощь с VIN-запросом +

МЫ ВСЕГДА РАДЫ ПОМОЧЬ

diff --git a/src/components/vin/VinLeftbar.tsx b/src/components/vin/VinLeftbar.tsx index ae65561..3cb5c57 100644 --- a/src/components/vin/VinLeftbar.tsx +++ b/src/components/vin/VinLeftbar.tsx @@ -23,6 +23,7 @@ interface VinLeftbarProps { activeTab?: 'uzly' | 'manufacturer'; openedPath?: string[]; setOpenedPath?: (path: string[]) => void; + onCloseQuickGroup?: () => void; } interface QuickGroup { @@ -32,7 +33,7 @@ interface QuickGroup { children?: QuickGroup[]; } -const VinLeftbar: React.FC = ({ vehicleInfo, onSearchResults, onNodeSelect, onActiveTabChange, onQuickGroupSelect, activeTab: activeTabProp, openedPath = [], setOpenedPath = () => {} }) => { +const VinLeftbar: React.FC = ({ vehicleInfo, onSearchResults, onNodeSelect, onActiveTabChange, onQuickGroupSelect, activeTab: activeTabProp, openedPath = [], setOpenedPath = () => {}, onCloseQuickGroup }) => { const router = useRouter(); const catalogCode = vehicleInfo?.catalog || ''; const vehicleId = vehicleInfo?.vehicleid || ''; @@ -65,6 +66,7 @@ const VinLeftbar: React.FC = ({ vehicleInfo, onSearchResults, o // Обновляем openedPath и URL const setOpenedPathAndUrl = (newPath: string[]) => { setOpenedPath(newPath); + if (onCloseQuickGroup) onCloseQuickGroup(); const params = new URLSearchParams(router.query as any); if (newPath.length > 0) { params.set('catpath', newPath.join(',')); @@ -320,6 +322,7 @@ const VinLeftbar: React.FC = ({ vehicleInfo, onSearchResults, o if (searchQuery) setSearchQuery(''); if (onActiveTabChange) onActiveTabChange('uzly'); if (onQuickGroupSelect) onQuickGroupSelect(null); + if (onCloseQuickGroup) onCloseQuickGroup(); }} > Узлы @@ -337,8 +340,8 @@ const VinLeftbar: React.FC = ({ vehicleInfo, onSearchResults, o e.preventDefault(); if (searchQuery) setSearchQuery(''); if (onActiveTabChange) onActiveTabChange('manufacturer'); - // Не вызываем onQuickGroupSelect с null - это вызывает ошибку - // Просто переключаем вкладку, а обработка отображения происходит через activeTab + if (onQuickGroupSelect) onQuickGroupSelect(null); + if (onCloseQuickGroup) onCloseQuickGroup(); }} > От производителя diff --git a/src/pages/index.tsx b/src/pages/index.tsx index f648af6..fd46c81 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -34,7 +34,7 @@ export default function Home() { - + {/* */} diff --git a/src/pages/vehicle-search/[brand]/[vehicleId].tsx b/src/pages/vehicle-search/[brand]/[vehicleId].tsx index c0e3a09..569cc3e 100644 --- a/src/pages/vehicle-search/[brand]/[vehicleId].tsx +++ b/src/pages/vehicle-search/[brand]/[vehicleId].tsx @@ -355,15 +355,17 @@ const VehicleDetailsPage = () => { { shallow: true } ); }; - // Функция для закрытия VinQuick и удаления quickgroup из URL + // --- Сброс VinQuick (selectedQuickGroup) и quickgroup в URL --- const closeQuickGroup = () => { setSelectedQuickGroup(null); const { quickgroup, ...rest } = router.query; - router.push( - { pathname: router.pathname, query: rest }, - undefined, - { shallow: true } - ); + if (quickgroup) { + router.push( + { pathname: router.pathname, query: rest }, + undefined, + { shallow: true } + ); + } }; // --- Синхронизация selectedNode (KnotIn) с URL --- @@ -448,6 +450,7 @@ const VehicleDetailsPage = () => { activeTab={activeTab} openedPath={openedPath} setOpenedPath={setOpenedPath} + onCloseQuickGroup={closeQuickGroup} /> {searchState.isSearching ? (
diff --git a/src/styles/my.css b/src/styles/my.css index 1b4a9a0..aa94fcf 100644 --- a/src/styles/my.css +++ b/src/styles/my.css @@ -23,7 +23,7 @@ align-items: flex-start; width: 100%; height: auto; - margin-top: -15px; + /* margin-top: -15px; */ padding-left: 60px; padding-right: 60px; display: flex; @@ -180,7 +180,7 @@ input.text-block-31 { background: #e5e7eb; } -.form-block, .text-field.w-input { +.form-block { min-height: 44px !important; } @@ -643,12 +643,19 @@ body { } +.knot-parts { + overflow: hidden; +} + @media screen and (max-width: 991px) { - .flex-block-108 { + .flex-block-108, .flex-block-14-copy-copy { flex-flow: column; justify-content: space-between; } + .flex-block-14-copy-copy{ + align-items: center; + } } @media screen and (max-width: 991px) { @@ -805,6 +812,12 @@ body { min-width: 160px !important; padding: 15px; } + .div-block-3 { + height: 102px !important; + } + .div-block-3.bp-item-info { + height: 90px !important; + } } @@ -825,6 +838,10 @@ body { line-height: 18px; overflow: hidden; } + + .knot-parts { + min-width: 100%; + } } @@ -845,4 +862,18 @@ body { padding: 15px; } } +@media screen and (max-width: 1440px) { + .image-27 { + margin-bottom: -212px; + margin-left: 800px; + } +} +@media (max-width: 991px) { + .topnav.w-nav { + margin-left: 0 !important; + } + .code-embed-15.w-embed { + display: none !important; + } +} diff --git a/src/styles/protekproject.webflow.css b/src/styles/protekproject.webflow.css index c6e66d8..fbff6ac 100644 --- a/src/styles/protekproject.webflow.css +++ b/src/styles/protekproject.webflow.css @@ -6897,7 +6897,7 @@ body { } .image-27 { - margin-bottom: -218px; + margin-bottom: -212px; margin-left: 800px; } }