pdfjs
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user