Heb er een PWA van gemaakt en layout gecorrigeerd

This commit is contained in:
LogJurgenR
2026-08-19 16:46:29 +02:00
parent d3cab99d86
commit 686339325e
21 changed files with 1629 additions and 103 deletions
+23
View File
@@ -0,0 +1,23 @@
"use client";
import { useRouter } from "next/navigation";
import { t, type Locale } from "@/lib/i18n";
export default function LogoutButton({ locale }: { locale: Locale }) {
const router = useRouter();
async function handleLogout() {
await fetch("/api/auth/logout", { method: "POST" });
router.push("/login");
}
return (
<button
type="button"
onClick={handleLogout}
className="inline-flex h-10 items-center rounded-lg bg-white/10 px-4 text-sm font-semibold text-white ring-1 ring-white/30 transition hover:bg-white/20"
>
{t(locale, "auth.logout")}
</button>
);
}