chore: reduce code by gndelia/codemod-replace-react-fc-typescript
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user