import { Button, Empty } from 'antd'
import { useNavigate } from 'react-router'

type NotFoundPageProps = {
  title?: string
}

export default function NotFoundPage({ title = '页面不存在' }: NotFoundPageProps) {
  const navigate = useNavigate()

  return (
    <main className="empty-page">
      <Empty description={title}>
        <Button type="primary" onClick={() => navigate('/admin/dashboard')}>
          返回概览
        </Button>
      </Empty>
    </main>
  )
}
