From 322cb31493ed3e7f8e1ea5c500c53a6023071322 Mon Sep 17 00:00:00 2001 From: Lee Robinson Date: Tue, 2 Mar 2021 10:30:24 -0600 Subject: [PATCH 1/2] Add note for using getStaticProps with 404.jd --- docs/advanced-features/custom-error-page.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/advanced-features/custom-error-page.md b/docs/advanced-features/custom-error-page.md index 243a76ce5164b..83086b361caef 100644 --- a/docs/advanced-features/custom-error-page.md +++ b/docs/advanced-features/custom-error-page.md @@ -21,6 +21,8 @@ export default function Custom404() { } ``` +> **Note**: You can use [`getStaticProps`](/docs/basic-features/data-fetching.md#getstaticprops-static-generation) inside this component if you need to fetch data at build time. + ## 500 Page By default Next.js provides a 500 error page that matches the default 404 page’s style. This page is not statically optimized as it allows server-side errors to be reported. This is why 404 and 500 (other errors) are separated. From 7f80cff55d4c85f2f4de4f9d962940b1effeaa1e Mon Sep 17 00:00:00 2001 From: Lee Robinson Date: Tue, 2 Mar 2021 10:31:18 -0600 Subject: [PATCH 2/2] Update docs/advanced-features/custom-error-page.md --- docs/advanced-features/custom-error-page.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced-features/custom-error-page.md b/docs/advanced-features/custom-error-page.md index 83086b361caef..1e16a0e9a17e3 100644 --- a/docs/advanced-features/custom-error-page.md +++ b/docs/advanced-features/custom-error-page.md @@ -21,7 +21,7 @@ export default function Custom404() { } ``` -> **Note**: You can use [`getStaticProps`](/docs/basic-features/data-fetching.md#getstaticprops-static-generation) inside this component if you need to fetch data at build time. +> **Note**: You can use [`getStaticProps`](/docs/basic-features/data-fetching.md#getstaticprops-static-generation) inside this page if you need to fetch data at build time. ## 500 Page