Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

feat: update pagesViewer on all

Marc Seitza372724d49f3
diff --git a/components/view/PagesViewerNew.tsx b/components/view/PagesViewerNew.tsx
index fb4b9dcd..86c02f2d 100644
--- a/components/view/PagesViewerNew.tsx
+++ b/components/view/PagesViewerNew.tsx
@@ -35,14 +35,13 @@ const trackPageView = async (data: {
versionNumber: number;
dataroomId?: string;
}) => {
- console.log("record view data: ", data);
- // await fetch("/api/record_view", {
- // method: "POST",
- // body: JSON.stringify(data),
- // headers: {
- // "Content-Type": "application/json",
- // },
- // });
+ await fetch("/api/record_view", {
+ method: "POST",
+ body: JSON.stringify(data),
+ headers: {
+ "Content-Type": "application/json",
+ },
+ });
};
export default function PagesViewer({
diff --git a/components/view/dataroom/dataroom-view.tsx b/components/view/dataroom/dataroom-view.tsx
index 71d5f650..35f03df8 100644
--- a/components/view/dataroom/dataroom-view.tsx
+++ b/components/view/dataroom/dataroom-view.tsx
@@ -19,6 +19,7 @@ import { useAnalytics } from "@/lib/analytics";
import DataroomViewer from "../DataroomViewer";
import PagesViewer from "../PagesViewer";
+import PagesViewerNew from "../PagesViewerNew";
import EmailVerificationMessage from "../email-verification-form";
export type DEFAULT_DOCUMENT_VIEW_TYPE = {
@@ -250,7 +251,7 @@ export default function DataroomView({
</div>
) : viewData.pages ? (
<div className="bg-gray-950">
- <PagesViewer
+ <PagesViewerNew
pages={viewData.pages}
viewId={viewData.viewId}
linkId={link.id}