mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-31 23:55:06 +08:00
### What problem does this PR solve? fix: display specific error message when previewing file error #868 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -3,7 +3,7 @@ import FileError from '../file-error';
|
||||
import { useFetchExcel } from '../hooks';
|
||||
|
||||
const Excel = ({ filePath }: { filePath: string }) => {
|
||||
const { status, containerRef } = useFetchExcel(filePath);
|
||||
const { status, containerRef, error } = useFetchExcel(filePath);
|
||||
|
||||
return (
|
||||
<div
|
||||
@ -11,7 +11,7 @@ const Excel = ({ filePath }: { filePath: string }) => {
|
||||
ref={containerRef}
|
||||
style={{ height: '100%', width: '100%' }}
|
||||
>
|
||||
{status || <FileError></FileError>}
|
||||
{status || <FileError>{error}</FileError>}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user