diff --git a/frontend/src/components/Layout.tsx b/frontend/src/components/Layout.tsx index d067760..4182e71 100644 --- a/frontend/src/components/Layout.tsx +++ b/frontend/src/components/Layout.tsx @@ -9,6 +9,11 @@ export default function Layout({ children }: { children: React.ReactNode }) { const { user } = useAuth() const hasCap = (cap: string) => can(user, cap) + async function logout() { + await fetch('/room-planner/api/auth/logout', { method: 'POST', credentials: 'include' }) + window.location.reload() + } + return (
{/* Desktop sidebar */} @@ -29,7 +34,18 @@ export default function Layout({ children }: { children: React.ReactNode }) { )} -
{user.name}
+
+
{user.name}
+
{user.email}
+ +