import { AnimatePresence, motion } from 'framer-motion'; import { Title } from './ui/Title'; import { promotionFeatures } from '../consts/promotionFeatures'; import { useEffect, useRef, useState } from 'react'; import { useHover } from 'usehooks-ts'; import { useLocation } from 'react-router-dom'; import { hashes } from '../consts/motivationHashes'; import { ChevronUpIcon } from './icons/ChevronUpIcon'; import { ChevronDownIcon } from './icons/ChevronDownIcon'; import { useWindowWidth } from '../hooks/useWindowWidth'; import { ClassNameWrapper } from '../hocs/ClassNameWrapper'; export function Promotion() { const width = useWindowWidth(); return (
Повышаем количество посетителей на стенде, <span className="text-gradient"> {' '} помогаем продвигать ваш продукт и увеличиваем продажи на выставках </span>
{promotionFeatures.map((feature, index) => width >= 1024 ? ( ) : ( ), )}
); } function DesktopFeature({ description, images, number, title, }: { number: number; title: string; description: string; images: string[]; }) { const { hash } = useLocation(); const ref = useRef(null); const hovered = useHover(ref); return (

[0{number}]

{title}

{description}
{images.map((image, index) => ( ))}
); } function Feature({ title, description, images, number, }: { title: string; description: string; images: string[]; number: number; }) { const [expanded, setExpanded] = useState(false); const [descriptionHeight, setDescriptionHeight] = useState(0); const root = useRef(null); const descriptionRef = useRef(null); // const imgRef = useRef(null); useEffect(() => { setDescriptionHeight(descriptionRef.current?.clientHeight ?? 0); }, [expanded, descriptionRef]); return ( setExpanded(prev => !prev)} >

{title}

: } />
{expanded && ( {description} )}
{images.map((image, index) => ( 0 ? 'max-sm:hidden' : ''} key={image} > {title} ))}
{title}
); }