fix: logout bug

This commit is contained in:
2025-03-09 16:34:05 +01:00
parent d3f5c3cb82
commit 7bf35b65fb
5 changed files with 23 additions and 26 deletions

View File

@@ -1,6 +1,5 @@
import { MouseEventHandler, useEffect, useState } from "react";
import { useSession } from "./Session";
import { logout } from "./api";
interface ContextMenuItem {
label: string;
@@ -18,7 +17,7 @@ export default function Avatar() {
const contextMenuItems: ContextMenuItem[] = [
{ label: "View Profile", onClick: () => console.log("View Profile") },
{ label: "Edit Profile", onClick: () => console.log("Edit Profile") },
{ label: "Logout", onClick: onLogout },
{ label: "Logout", onClick: () => onLogout() },
];
const handleMenuClick: MouseEventHandler<HTMLDivElement> = (event) => {