This commit is contained in:
2025-12-20 10:56:51 +05:00
@@ -40,10 +40,12 @@ export function CityPoint({
const { isLg } = useMediaQueries(); const { isLg } = useMediaQueries();
const handleCitySelect = () => setCityPoint({ title, x, y });
const { onMouseDown, onMouseLeave, onMouseUp, onTouchEnd, onTouchStart } = const { onMouseDown, onMouseLeave, onMouseUp, onTouchEnd, onTouchStart } =
useLongPress( useLongPress(
() => !isLg && setCityPoint({ title, x, y }), handleCitySelect, // onLongPress для мобильных
() => isLg && setCityPoint({ title, x, y }) handleCitySelect // onClick для десктопа
); );
const pointRef = useRef<HTMLButtonElement>(null); const pointRef = useRef<HTMLButtonElement>(null);
@@ -89,7 +91,7 @@ export function CityPoint({
}`} }`}
> >
<p <p
className={`heading2 group-hover:text-white relative transition-colors duration-300 font-medium ${ className={`heading2 group-hover:text-white transition-colors duration-300 font-medium ${
active ? "z-[2]" : "" active ? "z-[2]" : ""
}`} }`}
ref={refTitle} ref={refTitle}
@@ -97,7 +99,7 @@ export function CityPoint({
{title} {title}
</p> </p>
<p <p
className={`btns lg:h-[2.083vw] font-medium group-hover:text-white relative transition-colors duration-300 h-[5.114vw]${ className={`btns lg:h-[2.083vw] font-medium group-hover:text-white transition-colors duration-300 h-[5.114vw]${
active ? " z-[2]" : "" active ? " z-[2]" : ""
}`} }`}
ref={refCount} ref={refCount}
@@ -202,10 +204,8 @@ export function LogoItem({
opacity: 100, opacity: 100,
x: circleRadius * (1 - Math.cos(angle)), x: circleRadius * (1 - Math.cos(angle)),
y: circleRadius * (1 - Math.sin(angle)), y: circleRadius * (1 - Math.sin(angle)),
top: -circleRadius,
}}
style={{
zIndex: length - index, zIndex: length - index,
top: -circleRadius,
}} }}
exit={{ opacity: 0, transition: { delay: index * 0.1 } }} exit={{ opacity: 0, transition: { delay: index * 0.1 } }}
transition={{ delay: index * 0.1 + 0.3, bounce: "none" }} transition={{ delay: index * 0.1 + 0.3, bounce: "none" }}