diff --git a/themes/game/index.js b/themes/game/index.js index 07db77df..a2ad09e0 100644 --- a/themes/game/index.js +++ b/themes/game/index.js @@ -6,9 +6,11 @@ import NotionPage from '@/components/NotionPage' import { PWA as initialPWA } from '@/components/PWA' import ShareBar from '@/components/ShareBar' import { siteConfig } from '@/lib/config' +import { useGlobal } from '@/lib/global' import { loadWowJS } from '@/lib/plugins/wow' import { deepClone, isBrowser, shuffleArray } from '@/lib/utils' import Link from 'next/link' +import { useRouter } from 'next/router' import { createContext, useContext, useEffect, useRef, useState } from 'react' import Announcement from './components/Announcement' import { ArticleLock } from './components/ArticleLock' @@ -30,7 +32,6 @@ import SideBarContent from './components/SideBarContent' import SideBarDrawer from './components/SideBarDrawer' import CONFIG from './config' import { Style } from './style' -import { useRouter } from 'next/router' // const AlgoliaSearchModal = dynamic(() => import('@/components/AlgoliaSearchModal'), { ssr: false }) @@ -354,7 +355,7 @@ const LayoutSlug = props => { */ const Layout404 = props => { const router = useRouter() - const { locale } = useGameGlobal() + const { locale } = useGlobal() useEffect(() => { // 延时3秒如果加载失败就返回首页 setTimeout(() => { @@ -367,16 +368,21 @@ const Layout404 = props => { }, 3000) }, []) - return <> -
-
-

404

-
-

{locale.NAV.PAGE_NOT_FOUND_REDIRECT}

-
-
+ return ( + <> +
+
+

+ + 404 +

+
+

{locale.NAV.PAGE_NOT_FOUND_REDIRECT}

+
+
+ ) } /**