@@ -6,9 +6,11 @@ import NotionPage from '@/components/NotionPage'
6
6
import { PWA as initialPWA } from '@/components/PWA'
7
7
import ShareBar from '@/components/ShareBar'
8
8
import { siteConfig } from '@/lib/config'
9
+ import { useGlobal } from '@/lib/global'
9
10
import { loadWowJS } from '@/lib/plugins/wow'
10
11
import { deepClone , isBrowser , shuffleArray } from '@/lib/utils'
11
12
import Link from 'next/link'
13
+ import { useRouter } from 'next/router'
12
14
import { createContext , useContext , useEffect , useRef , useState } from 'react'
13
15
import Announcement from './components/Announcement'
14
16
import { ArticleLock } from './components/ArticleLock'
@@ -30,7 +32,6 @@ import SideBarContent from './components/SideBarContent'
30
32
import SideBarDrawer from './components/SideBarDrawer'
31
33
import CONFIG from './config'
32
34
import { Style } from './style'
33
- import { useRouter } from 'next/router'
34
35
35
36
// const AlgoliaSearchModal = dynamic(() => import('@/components/AlgoliaSearchModal'), { ssr: false })
36
37
@@ -354,7 +355,7 @@ const LayoutSlug = props => {
354
355
*/
355
356
const Layout404 = props => {
356
357
const router = useRouter ( )
357
- const { locale } = useGameGlobal ( )
358
+ const { locale } = useGlobal ( )
358
359
useEffect ( ( ) => {
359
360
// 延时3秒如果加载失败就返回首页
360
361
setTimeout ( ( ) => {
@@ -367,16 +368,21 @@ const Layout404 = props => {
367
368
} , 3000 )
368
369
} , [ ] )
369
370
370
- return < >
371
- < div className = 'md:-mt-20 text-black w-full h-screen text-center justify-center content-center items-center flex flex-col' >
372
- < div className = 'dark:text-gray-200' >
373
- < h2 className = 'inline-block border-r-2 border-gray-600 mr-2 px-3 py-2 align-top' > < i className = 'mr-2 fas fa-spinner animate-spin' /> 404</ h2 >
374
- < div className = 'inline-block text-left h-32 leading-10 items-center' >
375
- < h2 className = 'm-0 p-0' > { locale . NAV . PAGE_NOT_FOUND_REDIRECT } </ h2 >
376
- </ div >
377
- </ div >
371
+ return (
372
+ < >
373
+ < div className = 'md:-mt-20 text-black w-full h-screen text-center justify-center content-center items-center flex flex-col' >
374
+ < div className = 'dark:text-gray-200' >
375
+ < h2 className = 'inline-block border-r-2 border-gray-600 mr-2 px-3 py-2 align-top' >
376
+ < i className = 'mr-2 fas fa-spinner animate-spin' />
377
+ 404
378
+ </ h2 >
379
+ < div className = 'inline-block text-left h-32 leading-10 items-center' >
380
+ < h2 className = 'm-0 p-0' > { locale . NAV . PAGE_NOT_FOUND_REDIRECT } </ h2 >
381
+ </ div >
378
382
</ div >
383
+ </ div >
379
384
</ >
385
+ )
380
386
}
381
387
382
388
/**
0 commit comments