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,10 +1,10 @@
import { FunctionComponent, useEffect, useRef, useState } from 'react'
import { FC, useEffect, useRef, useState } from 'react'
import Preview from 'preview-office-docs'
import DownloadButtonGroup from '../DownloadBtnGtoup'
import { DownloadBtnContainer } from './Containers'
const OfficePreview: FunctionComponent<{ file: any }> = ({ file }) => {
const OfficePreview: FC<{ file: any }> = ({ file }) => {
const docContainer = useRef<HTMLDivElement>(null)
const [docContainerWidth, setDocContainerWidth] = useState(600)