"use client";

import Link from "next/link";
import { useCurrentUser } from "@/hooks/use-auth";

export function AdminNavLink() {
  const { data: user } = useCurrentUser();
  if (!user?.is_admin) return null;
  return (
    <Link
      href="/admin"
      className="rounded-md px-3 py-1.5 text-sm text-zinc-400 transition-colors hover:bg-zinc-800 hover:text-zinc-100"
    >
      Admin
    </Link>
  );
}
