Skip to content

Commit

Permalink
Add params to getStaticProps on err.sh (#10751)
Browse files Browse the repository at this point in the history
* Add params to getStaticProps

* Update errors/invalid-getstaticprops-value.md

Co-Authored-By: JJ Kasper <jj@jjsweb.site>

Co-authored-by: JJ Kasper <jj@jjsweb.site>
  • Loading branch information
chibicode and ijjk committed Mar 1, 2020
1 parent 24345c9 commit c52c038
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion errors/invalid-getstaticprops-value.md
Expand Up @@ -9,7 +9,11 @@ In one of the page's `getStaticProps` the return value had the incorrect shape.
Make sure to return the following shape from `getStaticProps`:

```js
export async function getStaticProps() {
export async function getStaticProps(ctx: {
params?: ParsedUrlQuery
preview?: boolean
previewData?: any
}) {
return {
props: { [key: string]: any }
}
Expand Down

0 comments on commit c52c038

Please sign in to comment.