This commit is contained in:
NextJS
2026-07-12 17:55:44 +00:00
parent 4ed4a10eae
commit e324a95625
28 changed files with 1087 additions and 114 deletions
+10 -1
View File
@@ -1,6 +1,10 @@
"use client";
export function AdminHeader() {
type Props = {
readOnly?: boolean;
};
export function AdminHeader({ readOnly = false }: Props) {
async function logout() {
await fetch("/api/auth/logout", { method: "POST" });
window.location.href = "/login";
@@ -12,6 +16,11 @@ export function AdminHeader() {
<h1 className="text-lg font-semibold tracking-tight text-zinc-900 dark:text-zinc-50">
Kick Kings Admin Dashboard
</h1>
{readOnly ? (
<p className="mt-0.5 text-xs font-medium uppercase tracking-wide text-amber-700 dark:text-amber-300">
Read-only access
</p>
) : null}
</div>
<button
type="button"