From de510ba5ae48ea8fa49fcb9ac8f837a6eb9acb29 Mon Sep 17 00:00:00 2001 From: lawvs <18554747+lawvs@users.noreply.github.com> Date: Tue, 2 Aug 2022 19:10:01 +0800 Subject: [PATCH] chore: clean code --- libs/components/editor-core/src/index.ts | 2 ++ libs/components/editor-core/src/recast-block/Context.tsx | 5 +++-- libs/components/ui/src/mui.ts | 5 +++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libs/components/editor-core/src/index.ts b/libs/components/editor-core/src/index.ts index 6cdd358058..72025bd68c 100644 --- a/libs/components/editor-core/src/index.ts +++ b/libs/components/editor-core/src/index.ts @@ -16,3 +16,5 @@ export * from './kanban/types'; export * from './utils'; export * from './editor'; + +export { SubPageProvider, useSubPage } from './sub-page'; diff --git a/libs/components/editor-core/src/recast-block/Context.tsx b/libs/components/editor-core/src/recast-block/Context.tsx index 55d334039b..c7bdfc11be 100644 --- a/libs/components/editor-core/src/recast-block/Context.tsx +++ b/libs/components/editor-core/src/recast-block/Context.tsx @@ -2,6 +2,7 @@ import { Protocol } from '@toeverything/datasource/db-service'; import { AsyncBlock } from '../editor'; import { ComponentType, createContext, ReactNode, useContext } from 'react'; import { RecastBlock } from './types'; +import { SubPageProvider } from '../sub-page'; /** * Determine whether the block supports RecastBlock @@ -47,7 +48,7 @@ export const RecastBlockProvider = ({ return ( - {children} + {children} ); }; @@ -60,7 +61,7 @@ export const useRecastBlock = () => { const recastBlock = useContext(RecastBlockContext); if (!recastBlock) { throw new Error( - 'Failed to find recastBlock! Please use the hook under `RecastTableProvider`.' + 'Failed to find recastBlock! Please use the hook under `RecastBlockProvider`.' ); } return recastBlock; diff --git a/libs/components/ui/src/mui.ts b/libs/components/ui/src/mui.ts index b0658ad526..47588ce5e6 100644 --- a/libs/components/ui/src/mui.ts +++ b/libs/components/ui/src/mui.ts @@ -13,6 +13,7 @@ import type { } from '@mui/material'; import { Avatar, + Backdrop, Box, Button, Checkbox, @@ -243,3 +244,7 @@ export const MuiFade = Fade; * @deprecated It is not recommended to use Mui directly, because the design will not refer to Mui's interaction logic. */ export const MuiRadio = Radio; +/** + * @deprecated It is not recommended to use Mui directly, because the design will not refer to Mui's interaction logic. + */ +export const MuiBackdrop = Backdrop;