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D0=BB=D0=B8=D0=B7=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B0=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=B4=D0=B5=D1=84=D0=BE=D0=BB=D1=82=D0=BD=D0=BE=D0=B3?= =?UTF-8?q?=D0=BE=20=D0=B1=D0=B0=D0=BD=D0=BD=D0=B5=D1=80=D0=B0=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=20=D0=BE=D1=82=D1=81=D1=83=D1=82=D1=81=D1=82=D0=B2?= =?UTF-8?q?=D0=B8=D0=B8=20=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D1=85.=20=D0=9E?= =?UTF-8?q?=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20=D1=81=D1=82?= =?UTF-8?q?=D0=B8=D0=BB=D0=B8=20=D0=B8=20=D1=81=D1=82=D1=80=D1=83=D0=BA?= =?UTF-8?q?=D1=82=D1=83=D1=80=D0=B0=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D1=82=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D1=83=D0=BB?= =?UTF-8?q?=D1=83=D1=87=D1=88=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C=D1=81?= =?UTF-8?q?=D0=BA=D0=BE=D0=B3=D0=BE=20=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D1=84?= =?UTF-8?q?=D0=B5=D0=B9=D1=81=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CatalogSortDropdown.tsx | 7 +- src/components/CloseIcon.tsx | 28 ++ src/components/CoreProductCard.tsx | 100 +++-- src/components/card/ProductBuyBlock.tsx | 5 +- src/components/card/ProductInfo.tsx | 6 + src/components/index/CategoryNavSection.tsx | 164 ++++++-- src/components/index/HeroSlider.tsx | 261 +++++++----- src/components/index/ProductOfDayBanner.tsx | 209 ++++++++++ src/components/index/ProductOfDaySection.tsx | 66 +--- src/components/vin/KnotIn.tsx | 19 +- src/components/vin/KnotParts.tsx | 77 +++- src/contexts/FavoritesContext.tsx | 4 +- src/hooks/useProductPrices.ts | 44 +-- src/lib/graphql.ts | 14 + src/lib/utils.ts | 10 + src/pages/_app.tsx | 7 +- src/pages/catalog.tsx | 394 ++++++++++++++++--- src/pages/index.tsx | 1 + src/pages/search-result.tsx | 35 +- 19 files changed, 1109 insertions(+), 342 deletions(-) create mode 100644 src/components/CloseIcon.tsx create mode 100644 src/components/index/ProductOfDayBanner.tsx diff --git a/src/components/CatalogSortDropdown.tsx b/src/components/CatalogSortDropdown.tsx index 1a66eb3..3abcb9a 100644 --- a/src/components/CatalogSortDropdown.tsx +++ b/src/components/CatalogSortDropdown.tsx @@ -3,16 +3,17 @@ import React, { useState, useRef, useEffect } from 'react'; interface CatalogSortDropdownProps { active: number; onChange: (index: number) => void; + options?: string[]; } -const sortOptions = [ +const defaultSortOptions = [ 'По популярности', 'Сначала дешевле', 'Сначала дороже', 'Высокий рейтинг', ]; -const CatalogSortDropdown: React.FC = ({ active, onChange }) => { +const CatalogSortDropdown: React.FC = ({ active, onChange, options = defaultSortOptions }) => { const [isOpen, setIsOpen] = useState(false); const dropdownRef = useRef(null); @@ -52,7 +53,7 @@ const CatalogSortDropdown: React.FC = ({ active, onCha
Сортировка