From d47e6dff40f14effc120192dd391fae4b34af545 Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Wed, 22 Jul 2026 11:10:09 +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 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Layout.tsx b/frontend/src/components/Layout.tsx index de69058..f1004cb 100644 --- a/frontend/src/components/Layout.tsx +++ b/frontend/src/components/Layout.tsx @@ -1,7 +1,7 @@ import { NavLink } from 'react-router-dom' import { TrendingUp, BarChart2, Target, History, - Settings, Bot, + Settings, Bot, LogOut, } from 'lucide-react' import { useAuth } from './AuthGate' import { can } from '../types' @@ -21,6 +21,11 @@ export default function Layout({ children }: { children: ReactNode }) { const { user } = useAuth() const items = NAV.filter(n => can(user, n.cap)) + async function logout() { + await fetch('/forecasting/api/auth/logout', { method: 'POST', credentials: 'include' }) + window.location.reload() + } + return (