Skip to content

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

fix: return `theme: null` in getstaticprops

Marc Seitzd5eeaedade87
diff --git a/components/NotionPage.tsx b/components/NotionPage.tsx
index 36945267..5e1ea3e1 100644
--- a/components/NotionPage.tsx
+++ b/components/NotionPage.tsx
@@ -60,7 +60,7 @@ export const NotionPage = ({
dataroomId?: string;
setDocumentData?: React.Dispatch<React.SetStateAction<TDocumentData | null>>;
isPreview?: boolean;
- theme?: NotionTheme;
+ theme?: NotionTheme | null;
}) => {
const [pageNumber, setPageNumber] = useState<number>(1); // start on first page
const [maxScrollPercentage, setMaxScrollPercentage] = useState<number>(0);
diff --git a/components/view/dataroom/dataroom-view.tsx b/components/view/dataroom/dataroom-view.tsx
index c8226f4d..e67ab27b 100644
--- a/components/view/dataroom/dataroom-view.tsx
+++ b/components/view/dataroom/dataroom-view.tsx
@@ -68,7 +68,7 @@ export type DEFAULT_DOCUMENT_VIEW_TYPE = {
sheetData?: SheetData[] | null;
notionData?: {
recordMap: ExtendedRecordMap | null;
- theme: NotionTheme | undefined;
+ theme: NotionTheme | null | undefined;
};
fileType?: string;
ipAddress?: string;
diff --git a/components/view/document-view.tsx b/components/view/document-view.tsx
index 6b3d6c16..7e96a85a 100644
--- a/components/view/document-view.tsx
+++ b/components/view/document-view.tsx
@@ -69,7 +69,7 @@ export default function DocumentView({
notionData?: {
rootNotionPageId: string | null;
recordMap: ExtendedRecordMap | null;
- theme: NotionTheme | undefined;
+ theme: NotionTheme | null;
};
brand?: Partial<Brand> | null;
token?: string;
diff --git a/components/view/view-data.tsx b/components/view/view-data.tsx
index af5d6d46..a289b305 100644
--- a/components/view/view-data.tsx
+++ b/components/view/view-data.tsx
@@ -33,7 +33,7 @@ export default function ViewData({
notionData?: {
rootNotionPageId: string | null;
recordMap: ExtendedRecordMap | null;
- theme: NotionTheme | undefined;
+ theme: NotionTheme | null;
};
brand?: Partial<Brand> | null;
showPoweredByBanner?: boolean;
diff --git a/pages/view/[linkId]/index.tsx b/pages/view/[linkId]/index.tsx
index ce65f495..7b210d49 100644
--- a/pages/view/[linkId]/index.tsx
+++ b/pages/view/[linkId]/index.tsx
@@ -57,7 +57,7 @@ export const getStaticProps = async (context: GetStaticPropsContext) => {
if (linkType === "DOCUMENT_LINK") {
let pageId = null;
let recordMap = null;
- let theme = undefined;
+ let theme = null;
const { type, file, ...versionWithoutTypeAndFile } =
link.document.versions[0];
@@ -195,7 +195,7 @@ export default function ViewPage({
notionData: {
rootNotionPageId: string | null;
recordMap: ExtendedRecordMap | null;
- theme: NotionTheme | undefined;
+ theme: NotionTheme | null;
};
meta: {
enableCustomMetatag: boolean;
diff --git a/pages/view/domains/[domain]/[slug]/index.tsx b/pages/view/domains/[domain]/[slug]/index.tsx
index 781e74c9..48f69726 100644
--- a/pages/view/domains/[domain]/[slug]/index.tsx
+++ b/pages/view/domains/[domain]/[slug]/index.tsx
@@ -62,7 +62,7 @@ export const getStaticProps = async (context: GetStaticPropsContext) => {
if (linkType === "DOCUMENT_LINK") {
let pageId = null;
let recordMap = null;
- let theme = undefined;
+ let theme = null;
const { type, file, ...versionWithoutTypeAndFile } =
link.document.versions[0];
@@ -198,7 +198,7 @@ export default function ViewPage({
notionData: {
rootNotionPageId: string | null;
recordMap: ExtendedRecordMap | null;
- theme: NotionTheme | undefined;
+ theme: NotionTheme | null;
};
meta: {
enableCustomMetatag: boolean;