/** * 自定义404界面 * @returns {JSX.Element} * @constructor */ import { useEffect } from 'react' import BaseLayout from '@/layouts/BaseLayout' import BLOG from '@/blog.config' import { useRouter } from 'next/router' export default function Custom404 () { const router = useRouter() useEffect(() => { // 延时3秒如果加载失败就返回首页 setTimeout(() => { if (window) { const article = document.getElementById('article-wrapper') if (!article) { router.push('/') } } }, 3000) }) return

404

页面找不到了,3秒后返回首页

}