import { useRouter } from 'next/router'; import classNames from 'classnames'; import NavMenu from 'components/common/NavMenu'; import styles from './MenuLayout.module.css'; export default function MenuLayout({ menu, selectedOption, className, menuClassName, contentClassName, children, replace = false, }) { const router = useRouter(); function handleSelect(url) { if (replace) { router.replace(url, undefined, { shallow: true }); } else { router.push(url, undefined, { shallow: true }); } } return (
{children}
); }