import { ExclamationCircleOutlined } from "@ant-design/icons";
import { Button, Space } from "antd";
import { useNavigate } from "react-router";

export function NotFoundPage() {
  const navigate = useNavigate();

  const handleGoHome = () => {
    void navigate("/");
  };

  return (
    <Space align="center" className="not-found-page" size="large" vertical>
      <ExclamationCircleOutlined className="not-found-icon" />
      <h1>404</h1>
      <p>您访问的页面不存在</p>
      <Button onClick={handleGoHome} type="primary">
        返回首页
      </Button>
    </Space>
  );
}
