fix
All checks were successful
Build And Deploy Main / build-and-deploy (push) Successful in 30s

This commit is contained in:
2026-03-16 16:18:15 -04:00
parent dc158997ff
commit 118c765b61
2 changed files with 14 additions and 6 deletions

View File

@@ -7,7 +7,9 @@ import { Dropdown } from "react-bootstrap";
function Layout() {
const location = useLocation();
const showMenu = location.pathname !== '/login' && location.pathname !== '/landing'; // Example: Hide menu on login page
const user = localStorage.getItem('user');
const userRaw = localStorage.getItem('user');
const user = userRaw ? JSON.parse(userRaw) : null;
const displayTitle = (user?.title || user?.roles?.[0] || '').toString();
const getLogoSuffix = () => {
return (window.location.hostname.includes('worldshine2.mayo.llc') || window.location.hostname.includes('site2') || window.location.host.includes('ws2') ||window.location.hostname.includes('localhost')) ? "Care LLC" : ((window.location.hostname.includes('worldshine3.mayo.llc') ||window.location.hostname.includes('site3') || window.location.hostname.includes('ws3')) ? "Cloverleaf LLC" : "International LLC");
}
@@ -23,8 +25,8 @@ function Layout() {
<div className="app-menu-user-profile ms-2">
<PersonCircle size={24}/>
<div className="user-info-container me-2">
<div className="user-name">{user && JSON.parse(user)?.username}</div>
<div className="user-role">{user && JSON.parse(user)?.roles[0]}</div>
<div className="user-name">{user?.username}</div>
<div className="user-role">{displayTitle}</div>
</div>
<Dropdown>
<Dropdown.Toggle variant="transparent" id="user-basic">