import React from 'react' import Link from 'next/link'; import { useState } from 'react'; import PropTypes from 'prop-types'; /** * Displays a navigation bar with logo and menu links * @param {Object} props object with the following properties: * { * logo: The relative url to the logo image * navMenu: An array of objects with menu items. E.g : [{ title: 'Blog', path: '/blog' },{ title: 'Search', path: '/search' }] * } * @returns React Component */ const Nav = ({ logo, navMenu }) => { const [open, setOpen] = useState(false); const handleClick = (event) => { event.preventDefault(); setOpen(!open); }; return ( ); }; Nav.propTypes = { logo: PropTypes.string.isRequired, navMenu: PropTypes.array.isRequired } export default Nav;