swap to set useDraggableItem as a variable so we can refer to it in our long press

This commit is contained in:
Gigiaj 2025-06-18 01:13:25 -05:00
parent 81a4113ec3
commit 868e4a8a90

View file

@ -412,7 +412,21 @@ function SpaceTab({
[folder, space] [folder, space]
); );
useDraggableItem(spaceDraggable, targetRef, onDragging); const handleDragStart = useCallback(() => {
if (isMobileSheetOpen) {
setMenuAnchor(undefined);
setMobileSheetOpen(false);
}
}, [isMobileSheetOpen]);
const isDragging = useDraggableItem(
spaceDraggable,
targetRef,
onDragging,
undefined,
handleDragStart
);
const dropState = useDropTarget(spaceDraggable, targetRef); const dropState = useDropTarget(spaceDraggable, targetRef);
const dropType = dropState?.type; const dropType = dropState?.type;