v0.1.24 — Sign-out: client-side signOut() statt Default-NextAuth-Page (matched UI)

This commit is contained in:
Hendrik 2026-05-01 21:46:35 +02:00
parent 18157d0a2f
commit a4efe3bee2
2 changed files with 8 additions and 3 deletions

View file

@ -1,6 +1,7 @@
"use client";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { signOut } from "next-auth/react";
import { LayoutDashboard, Globe, Layers, BarChart3, Settings, LogOut, KeyRound, History, Users } from "lucide-react";
import { Logo } from "./Logo";
import { cn } from "@/lib/utils";
@ -58,9 +59,13 @@ export function Sidebar({ user }: { user: { email: string; role?: string } }) {
<p className="truncate text-xs font-medium text-zinc-200">{user.email}</p>
<p className="truncate text-[10px] text-zinc-500">{user.role === "admin" ? "Admin" : "User"}</p>
</div>
<Link href="/api/auth/signout" className="rounded p-1 text-zinc-600 hover:text-zinc-300" title="Abmelden">
<button
onClick={() => signOut({ callbackUrl: "/login" })}
className="rounded p-1 text-zinc-600 hover:text-zinc-300"
title="Abmelden"
>
<LogOut className="h-3.5 w-3.5" />
</Link>
</button>
</div>
</div>
</aside>

View file

@ -1,6 +1,6 @@
{
"name": "corex-nexredirect",
"version": "0.1.23",
"version": "0.1.24",
"license": "MIT",
"overrides": {
"postcss": "^8.5.13",