Skip to content
This repository was archived by the owner on Mar 12, 2023. It is now read-only.

Commit 1b8e57b

Browse files
authored
Merge pull request #122 from otoyo/fix-displaying-blocks-in-parent-block
Fix displaying blocks in parent block
2 parents b6a66ed + 7eaa261 commit 1b8e57b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/notion-block.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ const NumberedListItems = ({ blocks, level = 1 }) =>
284284
</li>
285285
))
286286

287-
const SyncedBlock = ({ block }) => block.SyncedBlock.Children.map((child: interfaces.Block) => <NotionBlock block={child} key={child.Id} />)
287+
const SyncedBlock = ({ block }) => <NotionBlocks blocks={block.SyncedBlock.Children} />
288288

289289
const Toggle = ({ block }) => (
290290
<details className={styles.toggle}>
@@ -294,7 +294,7 @@ const Toggle = ({ block }) => (
294294
))}
295295
</summary>
296296
<div>
297-
{block.Toggle.Children.map((child: interfaces.Block) => <NotionBlock block={child} key={child.Id} />)}
297+
<NotionBlocks blocks={block.Toggle.Children} />
298298
</div>
299299
</details>
300300
)

0 commit comments

Comments
 (0)