refactor: substituir topbar por navbar componentizada

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Felipe Coutinho
2026-02-27 15:40:48 +00:00
parent 02814994f1
commit 842919bce5
12 changed files with 303 additions and 343 deletions

View File

@@ -0,0 +1,31 @@
"use client";
import { usePathname } from "next/navigation";
import { cn } from "@/lib/utils/ui";
import { NavLink } from "./nav-link";
import { linkActive, linkBase, linkIdle } from "./nav-styles";
type NavPillProps = {
href: string;
preservePeriod?: boolean;
children: React.ReactNode;
};
export function NavPill({ href, preservePeriod, children }: NavPillProps) {
const pathname = usePathname();
const isActive =
href === "/dashboard"
? pathname === href
: pathname === href || pathname.startsWith(`${href}/`);
return (
<NavLink
href={href}
preservePeriod={preservePeriod}
className={cn(linkBase, isActive ? linkActive : linkIdle)}
>
{children}
</NavLink>
);
}