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

@@ -1,8 +1,8 @@
import { styled } from '@toeverything/components/ui';
import { FC, useLayoutEffect, useMemo, useRef } from 'react';
import { styled, Theme } from '@toeverything/components/ui';
import { FC, useContext, useLayoutEffect, useMemo, useRef } from 'react';
// import { RenderChildren } from './RenderChildren';
import { useEditor } from '../Contexts';
import { RootContext } from '../contexts';
import { useBlock } from '../hooks';
interface RenderBlockProps {
@@ -14,7 +14,7 @@ export const RenderBlock: FC<RenderBlockProps> = ({
blockId,
hasContainer = true,
}) => {
const { editor, editorElement } = useEditor();
const { editor, editorElement } = useContext(RootContext);
const { block } = useBlock(blockId);
const blockRef = useRef<HTMLDivElement>(null);