From ff5c4293c3c9f2e32f0434baca59a7f3fea89500 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Mon, 17 Jan 2022 20:09:13 +0800 Subject: [PATCH] website: fix preview issue. --- website/src/Markdown/index.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/website/src/Markdown/index.tsx b/website/src/Markdown/index.tsx index 9b79e24..6984dc9 100644 --- a/website/src/Markdown/index.tsx +++ b/website/src/Markdown/index.tsx @@ -1,6 +1,7 @@ import { useEffect, useState } from 'react'; import MarkdownPreview from '@uiw/react-markdown-preview'; import Code from './Code'; +import pkg from '@uiw/react-layout/package.json'; import styles from './index.module.less'; export interface CreatePageProps extends React.HTMLAttributes { @@ -23,10 +24,6 @@ const getCodeStr = (data: any[] = [], code: string = '') => { export default function CreatePage(props: CreatePageProps) { const { renderPage, dependencies, path, ...other } = props; const [mdStr, setMdStr] = useState(''); - - // @ts-ignore - // eslint-disable-next-line - const version = VERSION || '2.0.0'; useEffect(() => { if (renderPage) { renderPage() @@ -70,8 +67,9 @@ export default function CreatePage(props: CreatePageProps) { if (Object.keys(config).filter((name) => config[name] !== undefined).length === 0) { return ; } - console.log('>>>', getCodeStr(node.children)); - return ; + return ( + + ); }, }} />