You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
436 B
14 lines
436 B
import { useContext } from 'react';
|
|
import { invariant } from '@react-dnd/invariant';
|
|
import { DndContext } from '../../common/DndContext';
|
|
/**
|
|
* A hook to retrieve the DragDropManager from Context
|
|
*/
|
|
|
|
export function useDragDropManager() {
|
|
var _useContext = useContext(DndContext),
|
|
dragDropManager = _useContext.dragDropManager;
|
|
|
|
invariant(dragDropManager != null, 'Expected drag drop context');
|
|
return dragDropManager;
|
|
} |