import * as React from 'react'; import Link from 'next/link'; import { useRouter } from 'next/router'; import classNames from 'classnames'; interface NavItem { href: string; icon: React.ReactNode; label: string; } const navItems: NavItem[] = [ { href: '/m', icon: ( ), label: 'Home', }, { href: '/m/scan', icon: ( ), label: 'Scan', }, { href: '/m/quick-add', icon: ( ), label: 'Add', }, { href: '/plants/explore', icon: ( ), label: 'Explore', }, { href: '/m/profile', icon: ( ), label: 'Profile', }, ]; export function BottomNav() { const router = useRouter(); const pathname = router.pathname; return ( {navItems.map((item) => { const isActive = pathname === item.href || pathname.startsWith(item.href + '/'); return ( {item.icon} {item.label} ); })} ); } export default BottomNav;