Skip to content

Commit

Permalink
Disabled eslint for exportPdf
Browse files Browse the repository at this point in the history
  • Loading branch information
3milyfz committed Nov 30, 2023
1 parent e209db1 commit b618b15
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default function PdfViewerComponent(props) {
const containerRef = useRef(null);
const [pdfInstance, setPdfInstance] = useState(null);

// eslint-disable-next-line react-hooks/exhaustive-deps
useEffect(() => {
const container = containerRef.current;
let PSPDFKit;
Expand All @@ -27,6 +28,7 @@ export default function PdfViewerComponent(props) {
};
}, [props.document]); // Dependency array should contain props.document

// eslint-disable-next-line no-unused-vars
const exportPdf = async () => {
if (pdfInstance) {
const pdfData = await pdfInstance.exportPDF();
Expand All @@ -46,6 +48,7 @@ export default function PdfViewerComponent(props) {
exportPdf,
});
}
// eslint-disable-next-line
}, [pdfInstance]);

// const instance = PSPDFKit.instance.default;
Expand Down

0 comments on commit b618b15

Please sign in to comment.