debug-panel , fix sth

This commit is contained in:
tangly1024.com
2023-02-09 12:23:42 +08:00
parent eee01c3085
commit 5f1a13e2a0
7 changed files with 18 additions and 14 deletions

View File

@@ -37,7 +37,9 @@ export function GlobalContextProvider({ children }) {
function switchTheme() {
const currentIndex = ALL_THEME.indexOf(theme)
const newIndex = currentIndex < ALL_THEME.length - 1 ? currentIndex + 1 : 0
changeTheme(ALL_THEME[newIndex])
const newTheme = ALL_THEME[newIndex]
changeTheme(newTheme)
return newTheme
}
function changeTheme(theme) {