import { HomeOutlined } from "@ant-design/icons";
import { useCallback } from "react";
import "../styles/pages/not-found.css";

interface NotFoundPageProps {
  onGoHome: () => void;
}

function NotFoundPage({ onGoHome }: NotFoundPageProps) {
  return (
    <section className="not-found-page page-motion">
      <div className="not-found-page__content">
        <div className="not-found-page__code">404</div>
        <h1>页面未找到</h1>
        <p>您访问的页面不存在或已被移除。</p>
        <button type="button" className="not-found-page__button" onClick={onGoHome}>
          <HomeOutlined />
          返回首页
        </button>
      </div>
    </section>
  );
}

export default NotFoundPage;
