diff --git a/components/common/NavMenu.js b/components/common/NavMenu.js index 6cbe7559..82d97fff 100644 --- a/components/common/NavMenu.js +++ b/components/common/NavMenu.js @@ -1,9 +1,10 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { useRouter } from 'next/router'; import classNames from 'classnames'; import styles from './NavMenu.module.css'; -export default function NavMenu({ options = [], className, onSelect = () => {} }) { +function NavMenu({ options = [], className, onSelect = () => {} }) { const router = useRouter(); return ( @@ -30,3 +31,17 @@ export default function NavMenu({ options = [], className, onSelect = () => {} } ); } + +NavMenu.propTypes = { + options: PropTypes.arrayOf( + PropTypes.shape({ + label: PropTypes.node, + value: PropTypes.any, + className: PropTypes.string, + render: PropTypes.func, + }), + ), + className: PropTypes.string, + onSelect: PropTypes.func, +}; +export default NavMenu;