react-notion-x icon indicating copy to clipboard operation
react-notion-x copied to clipboard

User @mentions don't render when coming through the notion integration API

Open pgerlich opened this issue 3 years ago • 0 comments
trafficstars

Description

We are using the compat transformer with the new Notion API to embed private Notion docs. The API is not returning the user data, so instead of the block trying to render the username (which is available on the block) it renders nothing in place of these private user @mentions.

I believe it is this line here that is short circuiting: https://github.com/NotionX/react-notion-x/blob/cfbfcc15145d9ece96d2fa526b5c4f8305576c99/packages/react-notion-x/src/components/text.tsx#L69

Sample data

Screen Shot 2022-09-01 at 8 58 50 AM

Sample output Screen Shot 2022-09-01 at 9 01 05 AM

Notion Test Page ID

The problem is inherently related to private pages.

pgerlich avatar Sep 01 '22 14:09 pgerlich