NotFoundPage.tsx 729 B

12345678910111213141516171819202122232425
  1. import React from 'react';
  2. import { useNavigate } from 'react-router';
  3. import { Button } from '@/client/components/ui/button';
  4. export const NotFoundPage = () => {
  5. const navigate = useNavigate();
  6. return (
  7. <div className="flex flex-col items-center justify-center flex-grow p-4">
  8. <div className="max-w-3xl w-full">
  9. <h1 className="text-2xl font-bold mb-4">404 - 页面未找到</h1>
  10. <p className="mb-6 text-muted-foreground">
  11. 您访问的页面不存在或已被移除
  12. </p>
  13. <div className="flex gap-4">
  14. <Button
  15. onClick={() => navigate('/admin')}
  16. >
  17. 返回首页
  18. </Button>
  19. </div>
  20. </div>
  21. </div>
  22. );
  23. };