diff --git a/apps/web/src/components/SortableGroup.tsx b/apps/web/src/components/SortableGroup.tsx index 4a8b270..7bb9d44 100644 --- a/apps/web/src/components/SortableGroup.tsx +++ b/apps/web/src/components/SortableGroup.tsx @@ -1,10 +1,8 @@ /** * Sortable wrapper for a project (space) sidebar group card. - * - * Wraps the card in @dnd-kit's useSortable so it can be dragged to reorder. - * Renders a grip handle icon on the title row. + * Renders a grip handle icon on the title row for drag-to-reorder. */ -import { CSS as DndCSS } from "@dnd-kit/utilities"; +import { CSS } from "@dnd-kit/utilities"; import { useSortable } from "@dnd-kit/sortable"; import { GripVertical } from "lucide-react"; import { memo, useMemo } from "react"; @@ -16,18 +14,11 @@ interface SortableGroupProps { } export const SortableGroup = memo(function SortableGroup({ group, children }: SortableGroupProps) { - const { - attributes, - listeners, - setNodeRef, - transform, - transition, - isDragging, - } = useSortable({ id: group.spaceId }); + const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: group.spaceId }); const style: React.CSSProperties = useMemo( () => ({ - transform: DndCSS.Translate.toString(transform), + transform: CSS.Translate.toString(transform), transition, opacity: isDragging ? 0.5 : undefined, zIndex: isDragging ? 1000 : undefined, @@ -38,7 +29,6 @@ export const SortableGroup = memo(function SortableGroup({ group, children }: So return (