diff --git a/package.json b/package.json index c76a9da8..73cf86e8 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "repository": "NotionX/react-notion-x", "author": "Travis Fischer ", "license": "MIT", + "version": "6.15.8", "engines": { "node": ">=12" }, diff --git a/packages/notion-types/src/collection.ts b/packages/notion-types/src/collection.ts index 9ffd583b..dda8d4e8 100644 --- a/packages/notion-types/src/collection.ts +++ b/packages/notion-types/src/collection.ts @@ -47,5 +47,6 @@ export interface Collection { property: PropertyID visibility: 'show' | 'hide' }> + hide_linked_collection_name?: boolean } } diff --git a/packages/react-notion-x/src/third-party/collection.tsx b/packages/react-notion-x/src/third-party/collection.tsx index 3367afcf..0f1c4c57 100644 --- a/packages/react-notion-x/src/third-party/collection.tsx +++ b/packages/react-notion-x/src/third-party/collection.tsx @@ -175,6 +175,8 @@ const CollectionViewBlock: React.FC<{ } const title = getTextContent(collection.name).trim() + const showTitle = + collectionView.format?.hide_linked_collection_name !== true && title if (collection.icon) { block.format = { ...block.format, @@ -194,9 +196,8 @@ const CollectionViewBlock: React.FC<{ /> )} -
- {/*TODO: only show if no full DB*/} - {title && ( + {showTitle && ( +
{title}
- )} -
+
+ )}