functioncomponent -> react.fc

This commit is contained in:
spencerwooo
2022-01-06 19:25:10 +08:00
parent 1201bcf4e8
commit fef6b1eee5
8 changed files with 16 additions and 20 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { useEffect, FunctionComponent, CSSProperties } from 'react'
import { useEffect, FC, CSSProperties } from 'react'
import Prism from 'prismjs'
import ReactMarkdown from 'react-markdown'
import gfm from 'remark-gfm'
@@ -14,7 +14,7 @@ import DownloadButtonGroup from '../DownloadBtnGtoup'
import useFileContent from '../../utils/fetchOnMount'
import { DownloadBtnContainer, PreviewContainer } from './Containers'
const MarkdownPreview: FunctionComponent<{ file: any; path: string; standalone?: boolean }> = ({
const MarkdownPreview: FC<{ file: any; path: string; standalone?: boolean }> = ({
file,
path,
standalone = true,