File size: 455 Bytes
dd4cbfc
ebf2bde
 
dd4cbfc
 
8dff6d9
dd4cbfc
ebf2bde
 
 
 
 
 
8dff6d9
ebf2bde
 
dd4cbfc
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import '@js-preview/excel/lib/index.css';
import FileError from '../file-error';
import { useFetchExcel } from '../hooks';

const Excel = ({ filePath }: { filePath: string }) => {
  const { status, containerRef, error } = useFetchExcel(filePath);

  return (
    <div
      id="excel"
      ref={containerRef}
      style={{ height: '100%', width: '100%' }}
    >
      {status || <FileError>{error}</FileError>}
    </div>
  );
};

export default Excel;