Buckets:
| import { NextPage } from "next"; | |
| import Head from "next/head"; | |
| interface ErrorPageProps { | |
| statusCode?: number | null | undefined; | |
| } | |
| /** | |
| * Rendered for 500 errors on both server and client. Used only in Production mode. | |
| * @link https://nextjs.org/docs/advanced-features/custom-error-page#more-advanced-error-page-customizing | |
| */ | |
| const ErrorPage: NextPage<ErrorPageProps> = ({ statusCode }) => ( | |
| <> | |
| <Head> | |
| <title>Error</title> | |
| </Head> | |
| <div style={{ padding: 10 }}> | |
| <h1>An error occurred</h1> | |
| <p> | |
| {statusCode | |
| ? `A server-side ${statusCode} error occurred.` | |
| : "A client-side error occurred."} | |
| </p> | |
| <a href="/">Go to the Home page</a> | |
| </div> | |
| </> | |
| ); | |
| ErrorPage.getInitialProps = ({ res, err }) => { | |
| const statusCode = res ? res.statusCode : err ? err.statusCode : 404; | |
| return { statusCode }; | |
| }; | |
| export default ErrorPage; | |
Xet Storage Details
- Size:
- 905 Bytes
- Xet hash:
- e763d50417418879536a654a556e95907458078c552da1f4bc50a20d9d9e0312
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.