"use client";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { Activity, Dumbbell, LayoutDashboard, Settings } from "lucide-react";
const links = [
{ href: "/", label: "Panel", icon: LayoutDashboard },
{ href: "/running", label: "Bieganie", icon: Activity },
{ href: "/strength", label: "SiĆownia", icon: Dumbbell },
{ href: "/settings", label: "Ustawienia", icon: Settings },
];
function isActive(pathname: string, href: string) {
return href === "/" ? pathname === "/" : pathname.startsWith(href);
}
export function NavLinks() {
const pathname = usePathname();
return (
<>
{links.map(({ href, label, icon: Icon }) => {
const active = isActive(pathname, href);
return (
{label}
);
})}
>
);
}