|
|
@@ -1,5 +1,6 @@
|
|
|
import React from 'react';
|
|
|
import { Button } from 'antd';
|
|
|
+import router from 'umi/router';
|
|
|
|
|
|
// 这里应该使用 antd 的 404 result 组件,
|
|
|
// 但是还没发布,先来个简单的。
|
|
|
@@ -17,7 +18,9 @@ const NoFoundPage: React.FC<{}> = () => (
|
|
|
<br />
|
|
|
<h1>404</h1>
|
|
|
<p>Sorry, the page you visited does not exist.</p>
|
|
|
- <Button type="primary">Back Home</Button>
|
|
|
+ <Button type="primary" onClick={() => router.push('/')}>
|
|
|
+ Back Home
|
|
|
+ </Button>
|
|
|
</div>
|
|
|
);
|
|
|
|