Skip to content

Commit

Permalink
Remove unecessary cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephanie Roy committed Sep 27, 2022
1 parent 9d16c73 commit f76faaa
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions webview/src/shared/components/dragDrop/DragDropContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,14 @@ export const DragDropContainer: React.FC<DragDropContainerProps> = ({
const dispatch = useDispatch()

const cleanup = useCallback(() => {
immediateDragLeave()
setDraggedOverId('')
setDraggedId('')
setDirection(defaultDragEnterDirection)
pickedUp.current = false
dispatch(changeRef(undefined))
if (pickedUp.current) {
immediateDragLeave()
setDraggedOverId('')
setDraggedId('')
setDirection(defaultDragEnterDirection)
pickedUp.current = false
dispatch(changeRef(undefined))
}
}, [
setDraggedOverId,
setDirection,
Expand Down

0 comments on commit f76faaa

Please sign in to comment.