Revert "Merge pull request #42 from toeverything/feat/sub-page"

This reverts commit cf6491fb0c, reversing
changes made to e12deb302f.
This commit is contained in:
DarkSky
2022-08-05 22:06:31 +08:00
parent cf6491fb0c
commit ecc7080179
16 changed files with 63 additions and 164 deletions

View File

@@ -2,7 +2,7 @@ import type { BlockEditor } from './editor';
import { styled, usePatchNodes } from '@toeverything/components/ui';
import type { FC, PropsWithChildren } from 'react';
import React, { useEffect, useRef, useState, useCallback } from 'react';
import { EditorProvider } from './Contexts';
import { RootContext } from './contexts';
import { SelectionRect, SelectionRef } from './Selection';
import {
Protocol,
@@ -151,7 +151,7 @@ export const RenderRoot: FC<PropsWithChildren<RenderRootProps>> = ({
};
return (
<EditorProvider value={{ editor, editorElement }}>
<RootContext.Provider value={{ editor, editorElement }}>
<Container
isWhiteboard={editor.isWhiteboard}
ref={ref => {
@@ -183,7 +183,7 @@ export const RenderRoot: FC<PropsWithChildren<RenderRootProps>> = ({
{editor.isWhiteboard ? null : <ScrollBlank editor={editor} />}
{patchedNodes}
</Container>
</EditorProvider>
</RootContext.Provider>
);
};