From 48e3b96fd421225f7f6ceebe9f4d657d413eeaf1 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Thu, 6 Jun 2024 15:22:23 -0300 Subject: [PATCH] Added user on header menu --- .../src/components/headerComponent/index.tsx | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/components/headerComponent/index.tsx b/src/frontend/src/components/headerComponent/index.tsx index 50a0c8cf8..e1b8ce2c5 100644 --- a/src/frontend/src/components/headerComponent/index.tsx +++ b/src/frontend/src/components/headerComponent/index.tsx @@ -56,7 +56,7 @@ export default function Header(): JSX.Element { const lastFlowVisitedIndex = routeHistory .reverse() .findIndex( - (path) => path.includes("/flow/") && path !== location.pathname + (path) => path.includes("/flow/") && path !== location.pathname, ); const lastFlowVisited = routeHistory[lastFlowVisitedIndex]; @@ -200,6 +200,28 @@ export default function Header(): JSX.Element { /> + {!autoLogin && ( + <> + +
+
+ {userData?.username ?? "User"} +
+ + + + )} General