mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-03 23:16:52 +00:00
theme game locale 404
This commit is contained in:
@@ -6,9 +6,11 @@ import NotionPage from '@/components/NotionPage'
|
|||||||
import { PWA as initialPWA } from '@/components/PWA'
|
import { PWA as initialPWA } from '@/components/PWA'
|
||||||
import ShareBar from '@/components/ShareBar'
|
import ShareBar from '@/components/ShareBar'
|
||||||
import { siteConfig } from '@/lib/config'
|
import { siteConfig } from '@/lib/config'
|
||||||
|
import { useGlobal } from '@/lib/global'
|
||||||
import { loadWowJS } from '@/lib/plugins/wow'
|
import { loadWowJS } from '@/lib/plugins/wow'
|
||||||
import { deepClone, isBrowser, shuffleArray } from '@/lib/utils'
|
import { deepClone, isBrowser, shuffleArray } from '@/lib/utils'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
import { useRouter } from 'next/router'
|
||||||
import { createContext, useContext, useEffect, useRef, useState } from 'react'
|
import { createContext, useContext, useEffect, useRef, useState } from 'react'
|
||||||
import Announcement from './components/Announcement'
|
import Announcement from './components/Announcement'
|
||||||
import { ArticleLock } from './components/ArticleLock'
|
import { ArticleLock } from './components/ArticleLock'
|
||||||
@@ -30,7 +32,6 @@ import SideBarContent from './components/SideBarContent'
|
|||||||
import SideBarDrawer from './components/SideBarDrawer'
|
import SideBarDrawer from './components/SideBarDrawer'
|
||||||
import CONFIG from './config'
|
import CONFIG from './config'
|
||||||
import { Style } from './style'
|
import { Style } from './style'
|
||||||
import { useRouter } from 'next/router'
|
|
||||||
|
|
||||||
// const AlgoliaSearchModal = dynamic(() => import('@/components/AlgoliaSearchModal'), { ssr: false })
|
// const AlgoliaSearchModal = dynamic(() => import('@/components/AlgoliaSearchModal'), { ssr: false })
|
||||||
|
|
||||||
@@ -354,7 +355,7 @@ const LayoutSlug = props => {
|
|||||||
*/
|
*/
|
||||||
const Layout404 = props => {
|
const Layout404 = props => {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { locale } = useGameGlobal()
|
const { locale } = useGlobal()
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// 延时3秒如果加载失败就返回首页
|
// 延时3秒如果加载失败就返回首页
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -367,16 +368,21 @@ const Layout404 = props => {
|
|||||||
}, 3000)
|
}, 3000)
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return <>
|
return (
|
||||||
<div className='md:-mt-20 text-black w-full h-screen text-center justify-center content-center items-center flex flex-col'>
|
<>
|
||||||
<div className='dark:text-gray-200'>
|
<div className='md:-mt-20 text-black w-full h-screen text-center justify-center content-center items-center flex flex-col'>
|
||||||
<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>
|
<div className='dark:text-gray-200'>
|
||||||
<div className='inline-block text-left h-32 leading-10 items-center'>
|
<h2 className='inline-block border-r-2 border-gray-600 mr-2 px-3 py-2 align-top'>
|
||||||
<h2 className='m-0 p-0'>{locale.NAV.PAGE_NOT_FOUND_REDIRECT}</h2>
|
<i className='mr-2 fas fa-spinner animate-spin' />
|
||||||
</div>
|
404
|
||||||
</div>
|
</h2>
|
||||||
|
<div className='inline-block text-left h-32 leading-10 items-center'>
|
||||||
|
<h2 className='m-0 p-0'>{locale.NAV.PAGE_NOT_FOUND_REDIRECT}</h2>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user