### 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)
20 lines
441 B
TypeScript
20 lines
441 B
TypeScript
import '@js-preview/excel/lib/index.css';
|
|
import FileError from '../file-error';
|
|
import { useFetchExcel } from '../hooks';
|
|
|
|
const Excel = ({ filePath }: { filePath: string }) => {
|
|
const { status, containerRef } = useFetchExcel(filePath);
|
|
|
|
return (
|
|
<div
|
|
id="excel"
|
|
ref={containerRef}
|
|
style={{ height: '100%', width: '100%' }}
|
|
>
|
|
{status || <FileError></FileError>}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Excel;
|