mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-30 23:26:36 +08:00
### What problem does this PR solve? Refactor: UmiJs -> Vite+React ### Type of change - [x] Refactoring --------- Co-authored-by: Liu An <asiro@qq.com>
30 lines
675 B
TypeScript
30 lines
675 B
TypeScript
import { Routes } from '@/routes';
|
|
import { history } from '@/utils/simple-history-util';
|
|
import { Button, Result } from 'antd';
|
|
import { useLocation } from 'react-router';
|
|
const NoFoundPage = () => {
|
|
const location = useLocation();
|
|
|
|
return (
|
|
<Result
|
|
status="404"
|
|
title="404"
|
|
subTitle="Page not found, please enter a correct address."
|
|
extra={
|
|
<Button
|
|
type="primary"
|
|
onClick={() => {
|
|
history.push(
|
|
location.pathname.startsWith(Routes.Admin) ? Routes.Admin : '/',
|
|
);
|
|
}}
|
|
>
|
|
Business
|
|
</Button>
|
|
}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default NoFoundPage;
|