balibabu
feat: delete the added model #503 and display an error message when the requested file fails to parse #684 (#708)
ebf2bde
raw
history blame
570 Bytes
import { Spin } from 'antd';
import FileError from '../file-error';
import { useFetchDocx } from '../hooks';
import styles from './index.less';
const Docx = ({ filePath }: { filePath: string }) => {
const { succeed, containerRef } = useFetchDocx(filePath);
return (
<>
{succeed ? (
<section className={styles.docxViewerWrapper}>
<div id="docx" ref={containerRef} className={styles.box}>
<Spin />
</div>
</section>
) : (
<FileError></FileError>
)}
</>
);
};
export default Docx;