refactor(web): remove useMixedTranslation, better resource loading (#30630)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Stephen Zhou
2026-01-07 13:20:09 +08:00
committed by GitHub
parent 357548ca07
commit e335cd0ef4
58 changed files with 230 additions and 548 deletions

View File

@@ -1,10 +1,10 @@
import type { Locale } from '@/i18n-config/language'
import { atom, useAtomValue } from 'jotai'
import { useTranslation } from '#i18n'
import { getDocLanguage, getLanguage, getPricingPageLanguage } from '@/i18n-config/language'
export const localeAtom = atom<Locale>('en-US')
export const useLocale = () => {
return useAtomValue(localeAtom)
const { i18n } = useTranslation()
return i18n.language as Locale
}
export const useGetLanguage = () => {