import { FC } from "react"; import Head from "next/head"; import { Stack, VStack, HStack, Heading, Text, Icon, useColorModeValue } from "@chakra-ui/react"; import { FaSadTear } from "react-icons/fa"; import Header from "./Header"; import Footer from "./Footer"; const statusTexts: { [key: string]: string } = { 400: "Bad Request", 404: "This page could not be found", 405: "Method Not Allowed", 500: "Internal Server Error", fallback: "An unexpected error has occurred" }; type Props = { statusCode: number }; const CustomError: FC = ({ statusCode }) => ( <> {statusCode} - {statusTexts?.[statusCode] ?? statusTexts.fallback}
{statusCode} {statusTexts?.[statusCode] ?? statusTexts.fallback}