mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-05-03 00:37:48 +08:00
### What problem does this PR solve? _Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR._ ### Type of change - [x] Refactoring
28 lines
778 B
TypeScript
28 lines
778 B
TypeScript
import { Button } from '@/components/ui/button';
|
|
import { Routes } from '@/routes';
|
|
import { useLocation, useNavigate } from 'react-router';
|
|
|
|
const NoFoundPage = () => {
|
|
const location = useLocation();
|
|
const navigate = useNavigate();
|
|
return (
|
|
<div className="flex flex-col items-center justify-center min-h-[60vh]">
|
|
<div className="text-6xl font-bold text-text-secondary mb-4">404</div>
|
|
<div className="text-lg text-text-secondary mb-8">
|
|
Page not found, please enter a correct address.
|
|
</div>
|
|
<Button
|
|
onClick={() => {
|
|
navigate(
|
|
location.pathname.startsWith(Routes.Admin) ? Routes.Admin : '/',
|
|
);
|
|
}}
|
|
>
|
|
Business
|
|
</Button>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default NoFoundPage;
|