We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a3bc92 commit bfa76ceCopy full SHA for bfa76ce
projects/fastgpt/components/header/LangSwitcher.tsx
@@ -20,7 +20,10 @@ export const LangSwitcher = () => {
20
21
const handleSwitchLanguage = (value: string) => {
22
localStorage.setItem('preferredLang', value);
23
- if (value === defaultLocale) {
+ if (value === 'zh') {
24
+ router.push('https://fastgpt.cn/');
25
+ return;
26
+ }else if (value === defaultLocale) {
27
router.push('/');
28
return;
29
}
@@ -32,7 +35,7 @@ export const LangSwitcher = () => {
32
35
if (storedLang && storedLang !== lang && storedLang !== defaultLocale) {
33
36
router.push(storedLang);
34
37
- }, [lang, router]);
38
+ }, []);
39
40
return (
41
<Select value={langName} onValueChange={handleSwitchLanguage}>
0 commit comments