Skip to content

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

feat: add collections to notion page

Marc Seitzcce5bee1a4af
diff --git a/components/NotionPage.tsx b/components/NotionPage.tsx
index 1a123a3c..07295d56 100644
--- a/components/NotionPage.tsx
+++ b/components/NotionPage.tsx
@@ -1,3 +1,5 @@
+import dynamic from "next/dynamic";
+
import { useEffect, useRef, useState } from "react";
import React from "react";
@@ -10,6 +12,12 @@ import "react-notion-x/src/styles.css";
import { TDocumentData } from "./view/dataroom/dataroom-view";
import Nav from "./view/nav";
+const Collection = dynamic(() =>
+ import("react-notion-x/build/third-party/collection").then(
+ (m) => m.Collection,
+ ),
+);
+
export const NotionPage = ({
recordMap,
rootPageId,
@@ -138,6 +146,7 @@ export const NotionPage = ({
rootPageId={rootPageId}
disableHeader={true}
components={{
+ Collection,
PageLink: (props: {
href: any;
children: