mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-11 01:30:29 +03:00
swap to set useDraggableItem as a variable so we can refer to it in our long press
This commit is contained in:
parent
81a4113ec3
commit
868e4a8a90
1 changed files with 15 additions and 1 deletions
|
|
@ -412,7 +412,21 @@ function SpaceTab({
|
|||
[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 dropType = dropState?.type;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue