import { Layout, Menu, Row } from 'antd'; import { Link, useRouteMatch } from 'react-router-dom'; const { Header, Content, Footer } = Layout; export const withLayout = (Component: (arg: any) => JSX.Element) => ({ ...props }: any) => { const { url } = useRouteMatch(); const menuItems = [ { label: 'Home', path: '/' }, { label: 'Bills', path: '/bills' } ]; return ( <>
🍉 Melon url.includes(item.path)) + 1).toString() ]} > {menuItems.map(({ label, path }, index) => ( {label} ))}
); };