File size: 1,545 Bytes
998d987
 
 
 
 
 
 
98b952a
 
 
 
 
 
 
 
998d987
 
 
 
 
98b952a
775ccbd
 
 
 
 
 
 
 
 
98b952a
 
775ccbd
 
 
 
 
 
 
998d987
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
"use client";

import Link from "next/link";
import { usePathname } from "next/navigation";
import { cn } from "@/lib/utils";

const links = [
  { href: "/landing",          label: "Home",       icon: "🏠" },
  { href: "/dashboard",        label: "Dashboard",  icon: "🖥️" },
  { href: "/episode",          label: "Episode",    icon: "▶️" },
  { href: "/ab",               label: "A/B Battle", icon: "⚔️" },
  { href: "/retention",        label: "Retention",  icon: "📈" },
  { href: "/memory",           label: "Memory",     icon: "🧠" },
  { href: "/learning",         label: "Learning",   icon: "📊" },
  { href: "/learning-playback",label: "Timeline",   icon: "🎬" },
];

export function Nav() {
  const pathname = usePathname();
  return (
    <nav className="mb-8 flex flex-wrap gap-1.5 rounded-2xl border border-purple-700/30 bg-purple-950/60 p-2 shadow-soft backdrop-blur-md">
      {links.map((link) => {
        const active = pathname === link.href;
        return (
          <Link
            key={link.href}
            href={link.href}
            className={cn(
              "flex items-center gap-1.5 rounded-xl px-3 py-2 text-sm font-medium transition-all",
              active
                ? "bg-violet-600 text-white shadow-sm"
                : "text-purple-200 hover:bg-purple-800/50 hover:text-white"
            )}
          >
            <span className="text-base leading-none">{link.icon}</span>
            <span>{link.label}</span>
          </Link>
        );
      })}
    </nav>
  );
}