From d69dee7caa4e1777a27f1de7e94c155ab6fb0b46 Mon Sep 17 00:00:00 2001 From: AlexSserb Date: Wed, 3 Sep 2025 14:03:19 +0400 Subject: [PATCH] fix: fixed swiping of a deal during dragging on mobile --- src/components/dnd/FunnelDnd/FunnelDnd.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/dnd/FunnelDnd/FunnelDnd.tsx b/src/components/dnd/FunnelDnd/FunnelDnd.tsx index d9abb21..f8ef2d2 100644 --- a/src/components/dnd/FunnelDnd/FunnelDnd.tsx +++ b/src/components/dnd/FunnelDnd/FunnelDnd.tsx @@ -1,6 +1,6 @@ "use client"; -import React, { ReactNode, RefObject } from "react"; +import React, { ReactNode, RefObject, useMemo } from "react"; import { DndContext, DragEndEvent, @@ -75,6 +75,7 @@ const FunnelDnd = < }: Props) => { const sensors = useDndSensors(); const isMobile = useIsMobile(); + const frequency = useMemo(() => (isMobile ? 1 : undefined), [isMobile]); const renderContainers = () => containers.map((container, index) => { @@ -159,6 +160,11 @@ const FunnelDnd = < return (