NotionX / react-notion-x

Fast and accurate React renderer for Notion. TS batteries included. ⚡️
https://react-notion-x-demo.transitivebullsh.it
MIT License
4.69k stars 544 forks source link

Issues in using react-notion-x in NextJS (app structure). #536

Open vule20 opened 6 months ago

vule20 commented 6 months ago

Description

I keep getting errors while using react-notion-x for my NextJS app. In the app/component/NotionPage.tsx, I did included "use client" at the top of the file, however I still get mistakes like this

image

In addition, import { useRouter } from "next/route"; doesn't work too. When I changed it to import { useRouter } from "next/navigation", I solved the problem, however, the rendered content is not exactly same as Notion. Here's the output for my rendering

image