feat: fix logout button, inactivity tracker, and concurrent session termination
All checks were successful
Staging Build / build (push) Successful in 2m16s
All checks were successful
Staging Build / build (push) Successful in 2m16s
This commit is contained in:
@@ -7,6 +7,7 @@ import { createBrowserClient } from "@supabase/ssr";
|
||||
import { type User } from "@supabase/supabase-js";
|
||||
import { Rocket, Menu, X, User as UserIcon, LogOut } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { signOut } from "@/lib/actions/auth";
|
||||
|
||||
interface NavbarClientProps {
|
||||
user: User | null;
|
||||
@@ -93,6 +94,11 @@ export function NavbarClient({ user, role = "partner" }: NavbarClientProps) {
|
||||
}, []);
|
||||
|
||||
const handleSignOut = async () => {
|
||||
try {
|
||||
await signOut();
|
||||
} catch (e) {
|
||||
console.error("Fehler beim Server-Signout:", e);
|
||||
}
|
||||
await supabase.auth.signOut();
|
||||
setCurrentUser(null);
|
||||
setIsMobileMenuOpen(false);
|
||||
|
||||
Reference in New Issue
Block a user