File size: 1,202 Bytes
5480d48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"use client";

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

export function AdminNav() {
    const pathname = usePathname();

    const links = [
        { href: "/admin/dashboard", label: "Dashboard" },
        { href: "/admin/analysis-queue", label: "Video Hub" },
        { href: "/admin/moderation", label: "Product Hub" },
        { href: "/admin/requests", label: "Opportunities Hub" },
        { href: "/admin/users", label: "Users" },
    ];

    return (
        <nav className="flex items-center gap-4 text-sm font-medium sm:ml-4">
            {links.map((link) => {
                const isActive = pathname === link.href;
                return (
                    <Link
                        key={link.href}
                        href={link.href}
                        className={cn(
                            "transition-colors hover:text-foreground/80",
                            isActive ? "text-foreground" : "text-muted-foreground"
                        )}
                    >
                        {link.label}
                    </Link>
                );
            })}
        </nav>
    );
}