import { NextPage, NextPageContext } from "next"; import Head from "next/head"; import Link from "next/link"; import styles from "../styles/Errorpage.module.css"; const Error: NextPage<{ statusCode?: number }> = ({ statusCode }) => { const svg = ` ${statusCode ? statusCode : "???"} `; return <> Error {statusCode} - c0ntroller.de
{ statusCode === 404 ? "The site you requested could not be found." : "An error occurred." }
> Back to the main page <
; }; Error.getInitialProps = ({ res, err }: NextPageContext) => { const statusCode = res ? res.statusCode : err ? err.statusCode : 404; return { statusCode }; }; export default Error;