import { Result, Button } from "antd"; import { NextPageContext } from "next"; interface ErrorProps { statusCode?: number; } function ErrorPage({ statusCode }: ErrorProps) { const getErrorMessage = () => { if (statusCode === 404) { return "页面未找到"; } else if (statusCode === 500) { return "服务器错误"; } return "发生了未知错误"; }; const getErrorTitle = () => { if (statusCode === 404) { return "404"; } else if (statusCode === 500) { return "500"; } return "错误"; }; return (