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.tsxindex 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 ? (<NotionPagerecordMap={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].tsxindex 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 urlconst 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 clientrecordMap,},},