fix: LanguageSwitcher empty text

This commit is contained in:
hamster1963 2024-12-15 01:52:40 +08:00
parent bdfbcaba65
commit 9921a9a9bb

View File

@ -13,7 +13,7 @@ import { useTranslation } from "react-i18next"
export function LanguageSwitcher() { export function LanguageSwitcher() {
const { t, i18n } = useTranslation() const { t, i18n } = useTranslation()
const locale = i18n.language const locale = i18n.languages[0]
const handleSelect = (e: Event, newLocale: string) => { const handleSelect = (e: Event, newLocale: string) => {
e.preventDefault() // 阻止默认的关闭行为 e.preventDefault() // 阻止默认的关闭行为