mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
默认主题切换的bug
This commit is contained in:
@@ -17,16 +17,22 @@ import useAdjustStyle from '@/hooks/useAdjustStyle'
|
||||
|
||||
// 各种扩展插件 这个要阻塞引入
|
||||
import ExternalPlugins from '@/components/ExternalPlugins'
|
||||
import { THEME } from '@/blog.config'
|
||||
import GlobalHead from '@/components/GlobalHead'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import BLOG from '@/blog.config'
|
||||
|
||||
/**
|
||||
* App挂载DOM 入口文件
|
||||
* @param {*} param0
|
||||
* @returns
|
||||
*/
|
||||
const MyApp = ({ Component, pageProps }) => {
|
||||
// 一些可能出现 bug 的样式,可以统一放入该钩子进行调整
|
||||
useAdjustStyle();
|
||||
|
||||
const route = useRouter()
|
||||
const queryParam = useMemo(() => {
|
||||
return getQueryParam(route.asPath, 'theme') || THEME
|
||||
return getQueryParam(route.asPath, 'theme') || siteConfig('THEME', BLOG.THEME, pageProps.NOTION_CONFIG)
|
||||
}, [route])
|
||||
|
||||
// 整体布局
|
||||
|
||||
Reference in New Issue
Block a user