Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
changLang = () => {
const locale = getLocale();
if (!locale || locale === 'zh-CN') {
setLocale('en-US');
} else {
setLocale('zh-CN');
}
};
onClick={() => {
setLocale('zh-TW');
}}
>
onClick={() => {
setLocale('zh-HK');
}}
>
changeLang = ({ key }) => {
setLocale(key);
};
changeLang = ({ key }) => {
setLocale(key);
};
onClick={() => {
setLocale('zh-CN');
}}
>
onClick={() => {
setLocale('en-US');
}}
>
<button> {
setLocale('en-US');
}}>en-US</button>
<button> {</button>
changLang = () => {
const locale = getLocale();
if (!locale || locale === 'zh-CN') {
setLocale('en-US');
} else {
setLocale('zh-CN');
}
};
changLang = ({ key }) => {
setLocale(key);
};