chore: reduce code by gndelia/codemod-replace-react-fc-typescript

This commit is contained in:
DarkSky
2022-08-12 01:26:27 +08:00
parent b4f56cda59
commit 40b617c429
73 changed files with 108 additions and 115 deletions

View File

@@ -10,10 +10,10 @@ interface RenderBlockProps {
hasContainer?: boolean;
}
export const RenderBlock: FC<RenderBlockProps> = ({
export const RenderBlock = ({
blockId,
hasContainer = true,
}) => {
}: RenderBlockProps) => {
const { editor, editorElement } = useEditor();
const { block } = useBlock(blockId);
const blockRef = useRef<HTMLDivElement>(null);

View File

@@ -6,7 +6,7 @@ interface RenderChildrenProps {
block: AsyncBlock;
}
export const RenderBlockChildren: FC<RenderChildrenProps> = ({ block }) => {
export const RenderBlockChildren = ({ block }: RenderChildrenProps) => {
return block.childrenIds.length ? (
<>
{block.childrenIds.map(childId => {