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
@@ -126,7 +126,7 @@ const CodeBlock = styled('div')(({ theme }) => ({
outline: 'none !important',
},
}));
export const CodeView: FC<CreateCodeView> = ({ block, editor }) => {
export const CodeView = ({ block, editor }: CreateCodeView) => {
const initValue: string = block.getProperty('text')?.value?.[0]?.text;
const langType: string = block.getProperty('lang');
const [extensions, setExtensions] = useState<Extension[]>();