封装useGlobal组件,存放全局变量;
新增search页面,修复搜索页无法分页的bug
This commit is contained in:
tangly1024
2021-11-04 13:28:08 +08:00
parent 8f9d3c45e7
commit 4b53a3612c
21 changed files with 214 additions and 169 deletions

View File

@@ -7,16 +7,14 @@ import 'font-awesome/css/font-awesome.min.css'
import BLOG from '@/blog.config'
import dynamic from 'next/dynamic'
import { LocaleProvider } from '@/lib/locale'
import { ThemeProvider } from '@/lib/theme'
import { GlobalContextProvider } from '@/lib/global'
const Ackee = dynamic(() => import('@/components/Ackee'), { ssr: false })
const Gtag = dynamic(() => import('@/components/Gtag'), { ssr: false })
const MyApp = ({ Component, pageProps }) => {
return (
<LocaleProvider>
<ThemeProvider>
<GlobalContextProvider>
{BLOG.isProd && BLOG?.analytics?.provider === 'ackee' && (
<Ackee
ackeeServerUrl={BLOG.analytics.ackeeConfig.dataAckeeServer}
@@ -25,8 +23,7 @@ const MyApp = ({ Component, pageProps }) => {
)}
{BLOG.isProd && BLOG?.analytics?.provider === 'ga' && <Gtag />}
<Component {...pageProps} />
</ThemeProvider>
</LocaleProvider>
</GlobalContextProvider>
)
}