Merge pull request #1116 from tangly1024/fix/website-performance

fix 遮罩和切换主题
This commit is contained in:
tangly1024
2023-06-07 17:04:30 +08:00
committed by GitHub
2 changed files with 2 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ export function GlobalContextProvider({ children }) {
const [theme, setTheme] = useState(BLOG.THEME) // 默认博客主题
const [isDarkMode, updateDarkMode] = useState(BLOG.APPEARANCE === 'dark') // 默认深色模式
const [onLoading, setOnLoading] = useState(false) // 抓取文章数据
const [onReading, setOnReading] = useState(true) // 网页资源加载
const [onReading, setOnReading] = useState(false) // 网页资源加载
const router = useRouter()
useEffect(() => {

View File

@@ -26,8 +26,7 @@ const Index = props => {
const loadLayout = async () => {
setLayoutIndex(dynamic(() => import(`@/themes/${theme}/LayoutIndex`)))
}
console.log(loadLayout)
// loadLayout()
loadLayout()
}, [theme])
return <Suspense fallback={<Loading/>}>