From 101863b2f3c9cce50d1c15bfa5e4dc6971409b35 Mon Sep 17 00:00:00 2001
From: realtradam <github@tradam.dev>
Date: Fri, 28 Jun 2024 20:12:25 -0400
Subject: add logout button

---
 react-frontend/src/routes/index.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'react-frontend/src/routes/index.tsx')

diff --git a/react-frontend/src/routes/index.tsx b/react-frontend/src/routes/index.tsx
index e22bcc4..6876ce5 100644
--- a/react-frontend/src/routes/index.tsx
+++ b/react-frontend/src/routes/index.tsx
@@ -4,10 +4,12 @@ import Home from "../pages/Home";
 import Layout from "../components/Layout";
 import CloseWindow from "../pages/CloseWindow";
 
+export type UserType = { name: string };
+
 export default function Index()
 {
 
-	const [userData, setUserData] = useState({ name: '' });
+	const [userData, setUserData] = useState<UserType>({ name: '' });
 	useEffect(() => {
 		const update_login_status = () => {
 			//localStorage.removeItem("logged in trigger");
@@ -30,7 +32,7 @@ export default function Index()
 	return (<>
 				<Router>
 					<Routes>
-						<Route path="/" element = {<Layout userData={userData}/>}>
+						<Route path="/" element = {<Layout userData={userData} setUserData={setUserData}/>}>
 							<Route index element={<Home />} />
 							<Route path="/closewindow" element={<CloseWindow />} />
 						</Route>
-- 
cgit v1.2.3

