This commit is contained in:
2025-11-16 11:36:11 +01:00
parent 7e0768a09a
commit dae66703f2
17 changed files with 1110 additions and 160 deletions
@@ -2,6 +2,7 @@ import { useCallback, useMemo } from 'react';
import type { JSX } from 'react';
import DocumentInfoPanel from '../documents/DocumentInfoPanel';
import { DownloadIcon } from '../ui/icons';
import PdfViewer from './PdfViewer';
interface DocumentLike {
id?: string | number;
@@ -87,11 +88,13 @@ const DocumentViewerLayout = ({
}
if (isPdf) {
const documentTitle = document.title
|| document.filename
|| document.original_name;
return (
<iframe
<PdfViewer
src={previewEntry.url}
title={`Preview of ${document.title}`}
className="document-viewer__object"
title={documentTitle ? `Preview of ${documentTitle}` : undefined}
/>
);
}