Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

index.tsx 570B

12345678910111213141516171819202122232425
  1. import { Spin } from 'antd';
  2. import FileError from '../file-error';
  3. import { useFetchDocx } from '../hooks';
  4. import styles from './index.less';
  5. const Docx = ({ filePath }: { filePath: string }) => {
  6. const { succeed, containerRef } = useFetchDocx(filePath);
  7. return (
  8. <>
  9. {succeed ? (
  10. <section className={styles.docxViewerWrapper}>
  11. <div id="docx" ref={containerRef} className={styles.box}>
  12. <Spin />
  13. </div>
  14. </section>
  15. ) : (
  16. <FileError></FileError>
  17. )}
  18. </>
  19. );
  20. };
  21. export default Docx;