Elle yazılmış tek-dosya CSS (sabit koyu tema, ham table/button, window.confirm ile silme onayı) yerine tutarlı bir bileşen sistemi: Card/Table/Badge/Button/ Input/Switch/AlertDialog primitifleri, Hanken Grotesk + JetBrains Mono tipografi çifti, "broadcast/monitör" temalı özel bir renk paleti (camgöbeği accent, ok/warn/err/live durum rengi sözlüğü). Tüm sayfalar (dashboard, kanal detay, segmentler, ayarlar, istatistik, kullanıcılar, login) aynı oturumda taşındı — silme onayları artık gerçek AlertDialog, native confirm() değil. Veri akışı/server action'lar değişmedi, tamamen görsel katman. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
25 lines
610 B
TypeScript
25 lines
610 B
TypeScript
"use client";
|
|
|
|
import Link from "next/link";
|
|
import { usePathname } from "next/navigation";
|
|
import type { ReactNode } from "react";
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
export function NavLink({ href, children }: { href: string; children: ReactNode }) {
|
|
const pathname = usePathname();
|
|
const active = href === "/" ? pathname === "/" : pathname.startsWith(href);
|
|
|
|
return (
|
|
<Link
|
|
href={href}
|
|
className={cn(
|
|
"text-sm font-medium transition-colors hover:text-foreground",
|
|
active ? "text-foreground" : "text-muted-foreground",
|
|
)}
|
|
>
|
|
{children}
|
|
</Link>
|
|
);
|
|
}
|