Fixed mobile menu being hidden.

This commit is contained in:
Mike Cao 2023-08-23 21:29:16 -07:00
parent 9180a7008b
commit bf8c891c41

View File

@ -1,3 +1,4 @@
import { createPortal } from 'react-dom';
import classNames from 'classnames'; import classNames from 'classnames';
import { useRouter } from 'next/router'; import { useRouter } from 'next/router';
import Link from 'next/link'; import Link from 'next/link';
@ -28,10 +29,11 @@ export function MobileMenu({ items = [], onClose }) {
</div> </div>
); );
return ( return createPortal(
<div className={classNames(styles.menu)}> <div className={classNames(styles.menu)}>
<Items items={items} /> <Items items={items} />
</div> </div>,
document.body,
); );
} }