mc-dashboard/components/Navbar.tsx
hurkicorgi dd69c17c3b Initial commit: Minecraft dashboard
Next.js 16 + Tailwind v4 + shadcn v4 dashboard for managing a modded
Forge 1.20.1 server. Includes server controls, player management, mod
manager with Modrinth search and dependency resolution, world backups,
snapshots, analytics, logs, and chat bridge.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 00:46:58 -06:00

40 lines
1.2 KiB
TypeScript

"use client";
import { useSession, signOut } from "next-auth/react";
import Link from "next/link";
import { Button } from "@/components/ui/button";
export function Navbar() {
const { data: session } = useSession();
return (
<header className="border-b border-border bg-card">
<div className="max-w-5xl mx-auto flex items-center justify-between px-3 sm:px-6 py-2.5 sm:py-3">
<Link href="/" className="font-bold text-primary text-base sm:text-lg tracking-tight">
HurkiCorgi MC
</Link>
<div className="flex items-center gap-1 sm:gap-2">
{session ? (
<>
<Button variant="ghost" size="sm" render={<Link href="/admin" />}>
Admin
</Button>
<Button
variant="ghost"
size="sm"
onClick={() => signOut({ callbackUrl: "/" })}
className="text-muted-foreground"
>
Logout
</Button>
</>
) : (
<Button variant="ghost" size="sm" render={<Link href="/login" />}>
Login
</Button>
)}
</div>
</div>
</header>
);
}