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>
40 lines
1.2 KiB
TypeScript
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>
|
|
);
|
|
}
|