Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
defaultMessage,
...rest,
});
}
const locales = getLocales();
if (locales[id]) {
return locales[id];
}
if (defaultMessage) {
return defaultMessage as string;
}
return id;
};
const { routes = [] } = route;
const { breadcrumb, menuData } = getMenuData(routes, menu, formatMessage, menuDataRender);
/**
* init variables
*/
const isMobile =
useMedia({
id: 'BasicLayout',
query: '(max-width: 599px)',
targetWindow: window || {
matchMedia: () => true,
},
})[0] && !props.disableMobile;
// If it is a fix menu, calculate padding
// don't need padding in phone mode
const hasLeftPadding = fixSiderbar && PropsLayout !== 'topmenu' && !isMobile;