// components/NavLink.tsx
import { Link, useLocation } from 'react-router-dom'
import React from 'react'
interface NavLinkProps {
to: string
icon: React.ReactNode
label: string
onClick?: () => void
className?: string
}
export function NavLink({ to, icon, label, onClick, className }: NavLinkProps) {
const location = useLocation()
const isActive = location.pathname === to
return (
{icon}
{label}
)
}