How to use the @ant-design/pro-layout/es/utils/getMenuData function in @ant-design/pro-layout

To help you get started, we’ve selected a few @ant-design/pro-layout examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Jkanon / webmagician-ui / src / layouts / Components / ProLayout / index.tsx View on Github external
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;