How to target the active Link in Next.js (next 13)
const Sidebar = () => {
const link = [
{
label: ' Home',
path: '/',
},
{
label: ' About',
path: '/about',
}
]
return (
<div>
{sidebarLink.map((link, index) =>
<Link
key={link.index}
href={link.path}>
</Link>
)}
</div>
)
}
export default Sidebar
I tried everything to no avail