测试编译

This commit is contained in:
tangly1024
2022-03-08 18:06:37 +08:00
parent 14beb27d0b
commit 69422fff7f
10 changed files with 138 additions and 71 deletions

View File

@@ -3,7 +3,7 @@ import { useContext, createContext, useState } from 'react'
import Router from 'next/router'
import { initDarkMode } from './theme'
import BLOG from '@/blog.config'
import { ThemeMap } from '@/themes'
import * as ThemeMap from '@/themes'
const GlobalContext = createContext()
let hasInit = false
@@ -18,6 +18,7 @@ export function GlobalContextProvider ({ children }) {
const [isDarkMode, updateDarkMode] = useState(false)
const [onLoading, changeLoadingState] = useState(false)
const [theme, setTheme] = useState(BLOG.THEME)
console.log('ThemeMap', ThemeMap)
const ThemeComponents = ThemeMap[theme]
Router.events.on('routeChangeStart', (...args) => {