NotFoundPage.tsx 702 B

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