Skip to content

Commit 387e0cb

Browse files
authored
Render links in DocumentRenderer (#5122)
1 parent 3bb4da8 commit 387e0cb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.changeset/gold-months-guess.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@keystone-next/document-renderer': patch
3+
---
4+
5+
Fixed `DocumentRenderer` not rendering links

packages-next/document-renderer/src/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ function DocumentNode({
197197
/>
198198
);
199199
}
200+
case 'link': {
201+
return <renderers.inline.link href={node.href as string}>{children}</renderers.inline.link>;
202+
}
200203
}
201204
return <Fragment>{children}</Fragment>;
202205
}

0 commit comments

Comments
 (0)