Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
}
}, []);
/**
* init variables
*/
const handleMenuCollapse = (payload: boolean): void =>
dispatch &&
dispatch({
type: 'global/changeLayoutCollapsed',
payload,
});
// set locale default as zh-CN
setLocale('zh-CN');
return (
{
if (menuItemProps.isUrl) {
return defaultDom;
}
return {defaultDom};
}}
breadcrumbRender={(routers = []) => [
{
path: '/',
breadcrumbName: formatMessage({
id: 'menu.home',
const changeLang = ({ key }: ClickParam): void => setLocale(key, false);
const locales = ['zh-CN', 'zh-TW', 'en-US', 'ja-JP'];
const changeLang = ({ key }: ClickParam): void => setLocale(key);
const locales = ['zh-CN', 'en-US'];
const changeLang = ({ key }) => {
setLocale(key);
};
const changeLang = ({ key }: ClickParam) => setLocale(key, false);
const locales = ['zh-CN', 'zh-TW', 'en-US', 'pt-BR'];
setLocale = (locale: ILocale, reload = false) => {
if (Object.keys(LOCALES).indexOf(locale as string) > -1) {
setLocale(locale, reload);
}
};
changeLang = ({ key }) => {
setLocale(key);
};
const changeLang = ({ key }) => setLocale(key);
const locales = ['zh-CN', 'zh-TW', 'en-US', 'pt-BR'];
const changeLang = ({ key }: ClickParam): void => setLocale(key, false);
const locales = ['zh-CN', 'zh-TW', 'en-US', 'pt-BR'];
const changeLang = ({ key }: ClickParam): void => setLocale(key, false);
const locales = ['zh-CN', 'zh-TW', 'en-US', 'pt-BR'];