diff --git a/projects/fastgpt/components/header/LangSwitcher.tsx b/projects/fastgpt/components/header/LangSwitcher.tsx index 421228d..12e7e47 100644 --- a/projects/fastgpt/components/header/LangSwitcher.tsx +++ b/projects/fastgpt/components/header/LangSwitcher.tsx @@ -20,7 +20,10 @@ export const LangSwitcher = () => { const handleSwitchLanguage = (value: string) => { localStorage.setItem('preferredLang', value); - if (value === defaultLocale) { + if (value === 'zh') { + router.push('https://fastgpt.cn/'); + return; + }else if (value === defaultLocale) { router.push('/'); return; } @@ -32,7 +35,7 @@ export const LangSwitcher = () => { if (storedLang && storedLang !== lang && storedLang !== defaultLocale) { router.push(storedLang); } - }, [lang, router]); + }, []); return (