fix: modify with new blocksuite version about subpage (#2060)

This commit is contained in:
Qi
2023-04-21 16:34:32 +08:00
committed by GitHub
parent 5a124831b8
commit 9ec6768272
18 changed files with 175 additions and 405 deletions

View File

@@ -1,12 +1,11 @@
import type {
DragEndEvent} from '@dnd-kit/core';
import type { DragEndEvent } from '@dnd-kit/core';
import {
closestCenter,
DndContext,
DragOverlay,
PointerSensor,
useSensor,
useSensors
useSensors,
} from '@dnd-kit/core';
import { useCallback, useState } from 'react';
@@ -47,7 +46,7 @@ export const TreeView = <RenderProps,>({
const { active, over } = e;
const position = over?.data.current?.position;
const dropId = over?.data.current?.node.id;
setDraggingId(undefined);
if (!over || !active || !position) {
return;
}