Download next.js/test/integration/client-404/pages/_error.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 531 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/integration/client-404/pages/_error.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/integration/client-404/pages/_error.js
-
curl -L -o _error.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/integration/client-404/pages/_error.js
531 Bytes
| import Link from 'next/link' | |
| import NextError from 'next/error' | |
| import React from 'react' | |
| export default class Error extends React.Component { | |
| static getInitialProps(ctx) { | |
| const { statusCode } = NextError.getInitialProps(ctx) | |
| return { statusCode: statusCode || null } | |
| } | |
| render() { | |
| return ( | |
| <div> | |
| <div id="errorStatusCode">{this.props.statusCode || 'unknown'}</div> | |
| <p> | |
| <Link href="/" id="errorGoHome"> | |
| go home | |
| </Link> | |
| </p> | |
| </div> | |
| ) | |
| } | |
| } | |