We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 367ee63 commit 60977faCopy full SHA for 60977fa
1 file changed
src/pages/404/index.tsx
@@ -1,7 +1,8 @@
1
+import { removePathUrlFromLocalStorage } from '@/layouts/DynamicMenusLayout/utils';
2
import { dict } from '@/services/i18nRuntime';
3
import { Button, Result } from 'antd';
4
import classNames from 'classnames';
-import React from 'react';
5
+import React, { useEffect } from 'react';
6
import { history } from 'umi';
7
import styles from './index.less';
8
@@ -12,6 +13,11 @@ const cx = classNames.bind(styles);
12
13
* @description 显示404错误页面,包含图片、提示信息和返回按钮
14
*/
15
const Index: React.FC = () => {
16
+ useEffect(() => {
17
+ // 缓存路径已不在当前菜单树中,清除无效的 workspace 记录
18
+ removePathUrlFromLocalStorage('workspace');
19
+ }, []);
20
+
21
return (
22
<div className={cx(styles.container)}>
23
<Result
0 commit comments