404.jsx 477B

12345678910111213141516171819
  1. import { Button, Result } from 'antd';
  2. import React from 'react';
  3. import { router } from 'umi'; // 这里应该使用 antd 的 404 result 组件,
  4. // 但是还没发布,先来个简单的。
  5. const NoFoundPage = () => (
  6. <Result
  7. status={404}
  8. title="404"
  9. subTitle="Sorry, the page you visited does not exist."
  10. extra={
  11. <Button type="primary" onClick={() => router.push('/')}>
  12. Back Home
  13. </Button>
  14. }
  15. />
  16. );
  17. export default NoFoundPage;