import React, { useState } from 'react'; import { Link, useNavigate } from 'react-router-dom'; import MenuIcon from '@mui/icons-material/Menu'; import CloseIcon from '@mui/icons-material/Close'; import $ from 'jquery'; import 'magnific-popup'; import 'magnific-popup/dist/magnific-popup.css'; import './Navbar.css'; const Navbar = () => { const [isMenuOpen, setIsMenuOpen] = useState(false); const navigate = useNavigate(); const handleLinkClick = (path) => { $.magnificPopup.close(); setIsMenuOpen(false); navigate(path); }; const toggleMenu = () => { if (!isMenuOpen) { $.magnificPopup.open({ items: { src: '#navbar-popup', type: 'inline' }, midClick: true, closeOnBgClick: true, callbacks: { open: () => setIsMenuOpen(true), close: () => setIsMenuOpen(false), }, }); } else { $.magnificPopup.close(); } }; return ( ); }; export default Navbar;