Skip to content

Commit

Permalink
Change map to flatMap in Builder.io example. (#8259)
Browse files Browse the repository at this point in the history
Co-authored-by: Sarah Rainsberger <[email protected]>
  • Loading branch information
gregplumbly and sarah11918 authored May 14, 2024
1 parent 9437b02 commit c12068f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/content/docs/en/guides/cms/builderio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ const { results: posts } = await fetch(
<body>
<ul>
{
posts.map(({ data: { slug, title } }) => (
posts.flatMap(({ data: { slug, title } }) => (
<li>
<a href={`/posts/${slug}`}>{title}</a>
</li>
Expand Down Expand Up @@ -318,7 +318,7 @@ const { html: postHTML } = await fetch(
<article>
<Fragment set:html={postHTML} />
</article>
<footer>The is your footer</footer>
<footer>This is your footer</footer>
</body>
</html>
```
Expand Down

0 comments on commit c12068f

Please sign in to comment.