mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-18 19:46:44 +08:00
feat: delete the added model #503 and display an error message when the requested file fails to parse #684 (#708)
### What problem does this PR solve? feat: delete the added model #503 feat: display an error message when the requested file fails to parse #684 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
25
web/src/pages/document-viewer/docx/index.tsx
Normal file
25
web/src/pages/document-viewer/docx/index.tsx
Normal file
@ -0,0 +1,25 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user