mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
Locale 模块重命名
This commit is contained in:
@@ -11,7 +11,7 @@ const GlobalContext = createContext()
|
||||
* @constructor
|
||||
*/
|
||||
export function GlobalContextProvider ({ children }) {
|
||||
const [locale, changeLocale] = useState(generateLocaleDict('en-US'))
|
||||
const [locale, updateLocale] = useState(generateLocaleDict('en-US'))
|
||||
const [isDarkMode, updateDarkMode] = useState(loadDarkModeFromCookies())
|
||||
const [onLoading, changeLoadingState] = useState(false)
|
||||
Router.events.on('routeChangeStart', (...args) => {
|
||||
@@ -25,7 +25,7 @@ export function GlobalContextProvider ({ children }) {
|
||||
// 服务端静态渲染,在渲染hooks后根据前端变量做初始化工作
|
||||
useEffect(() => {
|
||||
initTheme(isDarkMode, updateDarkMode)
|
||||
initLocale(locale, changeLocale)
|
||||
initLocale(locale, updateLocale)
|
||||
})
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user