refactor: clean anti pattern editor element

This commit is contained in:
lawvs committed 2022-08-18 17:41:43 +08:00
1 parent 05361e75a4
commit 06d442a8c1
5 files changed
+12 -24

No files matched your search

@@ -18,7 +18,6 @@ import { SelectBlock } from '../selection';
export interface CreateView {
block: AsyncBlock;
editor: Editor;
editorElement: () => JSX.Element;
/**
* @deprecated Use recast table instead
*/
@@ -13,7 +13,7 @@ export function RenderBlock({
blockId,
hasContainer = true,
}: RenderBlockProps) {
const { editor, editorElement } = useEditor();
const { editor } = useEditor();
const { block } = useBlock(blockId);
const setRef = useCallback(
@@ -50,7 +50,6 @@ export function RenderBlock({
block={block}
columns={columns.columns}
columnsFromId={columns.fromId}
editorElement={editorElement}
/>
);