import { Skeleton } from 'antd'; import { PdfHighlighter, PdfLoader } from 'react-pdf-highlighter'; import FileError from '../file-error'; import { useCatchError } from '../hooks'; interface IProps { url: string; } const PdfPreviewer = ({ url }: IProps) => { const { error } = useCatchError(url); const resetHash = () => {}; return (
} workerSrc="/pdfjs-dist/pdf.worker.min.js" errorMessage={{error}} onError={(e) => { console.warn(e); }} > {(pdfDocument) => { return ( event.altKey} onScrollChange={resetHash} scrollRef={() => {}} onSelectionFinished={() => null} highlightTransform={() => { return
; }} highlights={[]} /> ); }}
); }; export default PdfPreviewer;