import { Link, useLocation } from 'react-router-dom'; import { useState } from 'react'; export default function Navbar() { const location = useLocation(); const [mobileOpen, setMobileOpen] = useState(false); const navLinks = [ { to: '/', label: 'Home' }, { to: '/calculator', label: 'Calculator' }, { to: '/history', label: 'History' }, ]; const isActive = (path) => { if (path === '/') return location.pathname === '/'; return location.pathname.startsWith(path); }; return ( ); }