react-notion-x
react-notion-x copied to clipboard
fix: make collectionView parameter optional
trafficstars
Description
The getCollectionData only requires two parameters, as shown in this README.
However, the typing makes it look like it requires a third parameter, collectionView, which is in fact optional. If users din't pass collectionView to the function, Typescript will complain.
Notion Test Page ID
Just try passing these two ids to getCollectionData, and the response is successful.
const collectionId = '2d8aec23-8281-4a94-9090-caaf823dd21a'
const collectionViewId = 'ab639a5a-853e-45e1-9ef7-133b486c0acf'
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| react-notion-x | ✅ Ready (Inspect) | Visit Preview | Jul 6, 2022 at 5:02AM (UTC) |
| react-notion-x-minimal-demo | ✅ Ready (Inspect) | Visit Preview | Jul 6, 2022 at 5:02AM (UTC) |