Unverified Commit 2af5a0e4 authored by Kenneth Lum's avatar Kenneth Lum Committed by GitHub

it is props: { posts } (#23004)

changing `props: posts` to `props: { posts }`
parent e7a22afe
...@@ -156,7 +156,7 @@ export async function getStaticProps() { ...@@ -156,7 +156,7 @@ export async function getStaticProps() {
const res = await fetch('https://.../posts') const res = await fetch('https://.../posts')
const posts = await res.json() const posts = await res.json()
// By returning { props: posts }, the Blog component // By returning { props: { posts } }, the Blog component
// will receive `posts` as a prop at build time // will receive `posts` as a prop at build time
return { return {
props: { props: {
...@@ -325,7 +325,7 @@ export async function getStaticProps() { ...@@ -325,7 +325,7 @@ export async function getStaticProps() {
content: fileContents, content: fileContents,
} }
}) })
// By returning { props: posts }, the Blog component // By returning { props: { posts } }, the Blog component
// will receive `posts` as a prop at build time // will receive `posts` as a prop at build time
return { return {
props: { props: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment