import React from 'react'; import { Drawer } from 'antd'; import { SiderMenuProps } from './SiderMenu'; import SiderMenu from './SiderMenu'; import { getFlatMenuKeys } from './SiderMenuUtils'; export { SiderMenuProps }; export { MenuDataItem, Route } from './BaseMenu'; const SiderMenuWrapper: React.FC = props => { const { isMobile, menuData, collapsed, onCollapse } = props; const flatMenuKeys = getFlatMenuKeys(menuData); return isMobile ? ( onCollapse!(true)} style={{ padding: 0, height: '100vh', }} > ) : ( ); }; SiderMenuWrapper.defaultProps = { onCollapse: () => void 0, }; export default React.memo(SiderMenuWrapper);