diff --git a/frontend/components/Profile.tsx b/frontend/components/Profile.tsx index bf3a93f..0ffd6c8 100755 --- a/frontend/components/Profile.tsx +++ b/frontend/components/Profile.tsx @@ -34,20 +34,21 @@ export const Profile: React.FC = ({ onLogout, msalInstance }) => { const getRoleDisplay = (): string => { if (!user) return 'Loading...'; - const label = ROLE_LABELS[user.role] ?? user.role; - return user.agencyName ? `${label} (${user.agencyName})` : label; + return ROLE_LABELS[user.role] ?? user.role; }; const userDetails = userInfo ? { - 'Role': getRoleDisplay(), 'First Name': userInfo.firstName || 'N/A', 'Last Name': userInfo.lastName || 'N/A', 'Email': userInfo.email, + 'Role': getRoleDisplay(), + 'Agency': user?.agencyName || 'N/A', } : { - 'Role': 'Loading...', 'First Name': '', 'Last Name': '', 'Email': '', + 'Role': 'Loading...', + 'Agency': '', }; const handleLogout = () => {