mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-08 07:26:47 +00:00
feature:
封装useGlobal组件,存放全局变量; 新增search页面,修复搜索页无法分页的bug
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user