Feat/install process refinement (#3982)

This commit is contained in:
crazywoola
2024-04-29 17:55:52 +08:00
committed by GitHub
parent 1d432728ac
commit c5e2659771
26 changed files with 871 additions and 840 deletions

View File

@@ -8,13 +8,13 @@ import { getLanguage } from '@/i18n/language'
type II18NContext = {
locale: Locale
i18n: Record<string, any>
setLocaleOnClient: (locale: Locale, reloadPage?: boolean) => void
setLocaleOnClient: (_lang: Locale, _reloadPage?: boolean) => void
}
const I18NContext = createContext<II18NContext>({
locale: 'en-US',
i18n: {},
setLocaleOnClient: (lang: Locale, reloadPage?: boolean) => { },
setLocaleOnClient: (_lang: Locale, _reloadPage?: boolean) => { },
})
export const useI18N = () => useContext(I18NContext)