ragflow/web/src/pages/document-viewer/file-error/index.tsx
chanx 5d0981d046
Refactoring: Integrating the file preview component (#11523)
### What problem does this PR solve?

Refactoring: Integrating the file preview component

### Type of change

- [x] Refactoring
2025-11-25 19:13:00 +08:00

19 lines
579 B
TypeScript

import { useTranslate } from '@/hooks/common-hooks';
import React from 'react';
const FileError = ({ children }: React.PropsWithChildren) => {
const { t } = useTranslate('fileManager');
return (
<div className="flex items-center justify-center min-h-screen">
<div className="bg-state-error-5 border border-state-error rounded-lg p-4 shadow-sm">
<div className="flex ml-3">
<div className="text-white font-medium">
{children || t('fileError')}
</div>
</div>
</div>
</div>
);
};
export default FileError;