Skip to content

Commit 5aaf5db

Browse files
committed
chore: remove SSR on notion
1 parent 1b9a2ca commit 5aaf5db

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/components/Notion/Notion.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use client'
22

3+
import dynamic from 'next/dynamic'
34
import { LinkProps } from 'next/link'
45
import { ExtendedRecordMap } from 'notion-types'
56
import { ReactNode, useEffect, useRef } from 'react'
6-
import { NotionRenderer } from 'react-notion-x'
77
import { Collection } from 'react-notion-x/build/third-party/collection'
88
import Link from 'components/base/buttons/Link'
99
import Breadcrumbs from 'components/breadcrumbs/Breadcrumbs'
@@ -13,6 +13,10 @@ import { improveAccessibility } from './utils'
1313
import styles from './Notion.module.css'
1414
import 'react-notion-x/src/styles.css'
1515

16+
const NotionRenderer = dynamic(() => import('react-notion-x').then((mod) => mod.NotionRenderer), {
17+
ssr: false,
18+
})
19+
1620
const Notion = ({
1721
title,
1822
description,

0 commit comments

Comments
 (0)