diff --git a/.dumi/pages/404/index.tsx b/.dumi/pages/404/index.tsx index 4f8d37c526..a15eb59726 100644 --- a/.dumi/pages/404/index.tsx +++ b/.dumi/pages/404/index.tsx @@ -1,7 +1,7 @@ -import React, { useEffect } from 'react'; -import { Result, Button } from 'antd'; import { HomeOutlined } from '@ant-design/icons'; +import { Button, Result } from 'antd'; import { Link, useLocation } from 'dumi'; +import React, { useEffect } from 'react'; import * as utils from '../../theme/utils'; export interface NotFoundProps { @@ -29,6 +29,15 @@ const NotFoundPage: React.FC = ({ router }) => { router.replace(utils.getLocalizedPathname(`/${DIRECT_MAP[matchPath]}`, isZhCN).pathname); } } + + // Report if necessary + const { yuyanMonitor } = window as any; + if (yuyanMonitor) { + yuyanMonitor.log({ + code: 11, + msg: `Page not found: ${location.href}; Source: ${document.referrer}`, + }); + } }, []); return (