Skip to content

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

refactor: do not pass notionId to client

Marc Seitz3dc4a7d85b45
diff --git a/components/view/document-view.tsx b/components/view/document-view.tsx
index 8c19171f..ec19aa21 100644
--- a/components/view/document-view.tsx
+++ b/components/view/document-view.tsx
@@ -122,10 +122,10 @@ export default function DocumentView({
return (
<div className="bg-gray-950">
{submitted ? (
- notionData.recordMap && notionData.rootNotionPageId ? (
+ notionData.recordMap ? (
<NotionPage
recordMap={notionData.recordMap}
- rootPageId={notionData.rootNotionPageId}
+ // rootPageId={notionData.rootNotionPageId}
viewId={viewData.viewId}
linkId={link.id}
documentId={document.id}
diff --git a/pages/view/[linkId].tsx b/pages/view/[linkId].tsx
index 494820d6..203b3534 100644
--- a/pages/view/[linkId].tsx
+++ b/pages/view/[linkId].tsx
@@ -52,11 +52,7 @@ export const getStaticProps = async (context: {
const { type, file, ...versionWithoutTypeAndFile } =
link.document.versions[0];
- console.log("type", type);
- console.log("file", file);
-
if (type === "notion") {
- // regex match to get the page id from the notion url
const notionPageId = parsePageId(file, { uuid: false });
if (!notionPageId) {
return {
@@ -79,7 +75,7 @@ export const getStaticProps = async (context: {
},
},
notionData: {
- rootNotionPageId: pageId,
+ rootNotionPageId: null, // do not pass rootNotionPageId to the client
recordMap,
},
},