Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
fix: fix legacy pdfviewer
Marc Seitzec12c1549e42
diff --git a/components/PDFViewer.tsx b/components/PDFViewer.tsxindex 71a650b2..fdf6e967 100644--- a/components/PDFViewer.tsx+++ b/components/PDFViewer.tsx@@ -13,7 +13,6 @@ export default function PDFViewer(props: any) {const startTimeRef = useRef(Date.now());const pageNumberRef = useRef<number>(pageNumber);- const isInitialPageLoad = useRef(true);// Update the previous page number after the effect hook has runuseEffect(() => {@@ -102,12 +101,6 @@ export default function PDFViewer(props: any) {}async function trackPageView(duration: number = 0) {- // If this is the initial page load, don't send the request- if (isInitialPageLoad.current) {- isInitialPageLoad.current = false;- return;- }-await fetch("/api/record_view", {method: "POST",body: JSON.stringify({