From 24c6fa1f7da00ec72a03a6c01c8dce1bf945a005 Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Wed, 22 Jul 2026 11:10:07 +0000 Subject: [PATCH] Add name, email and sign out button to sidebar footer Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/components/Layout.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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}
+ +