refactor: moved dnd part from Funnel into FunnelDnd

This commit is contained in:
2025-08-06 18:21:07 +04:00
parent 96c53380e0
commit 4b843d8e5d
23 changed files with 410 additions and 287 deletions

View File

@ -12,8 +12,8 @@ import { SortableContext } from "@dnd-kit/sortable";
import { LexoRank } from "lexorank";
import { Box, Group } from "@mantine/core";
import useDndSensors from "@/app/deals/hooks/useSensors";
import { SortableItem } from "@/components/dnd/SortableDnd/SortableItem";
import { SortableOverlay } from "@/components/dnd/SortableDnd/SortableOverlay";
import SortableItem from "@/components/dnd/SortableItem";
import { getNewLexorank, sortByLexorank } from "@/utils/lexorank";
type BaseItem = {
@ -119,9 +119,7 @@ const SortableDnd = <T extends BaseItem>({
</Group>
</SortableContext>
<SortableOverlay>
<div style={{ cursor: "grabbing" }}>
{activeItem ? renderItem(activeItem) : null}
</div>
{activeItem ? renderItem(activeItem) : null}
</SortableOverlay>
</DndContext>
);