ENCOA-120: Prevented flicker when leaving page
This commit is contained in:
@@ -22,7 +22,7 @@ export function getUserCompanyName(user: User, users: User[], groups: Group[]) {
|
||||
if (isCorporateUser(user)) return user.corporateInformation?.companyInformation?.name || user.name;
|
||||
if (isAgentUser(user)) return user.agentInformation?.companyName || user.name;
|
||||
|
||||
const belongingGroups = groups.filter((x) => x.participants.includes(user.id));
|
||||
const belongingGroups = groups.filter((x) => x.participants.includes(user?.id));
|
||||
const belongingGroupsAdmins = belongingGroups.map((x) => users.find((u) => u.id === x.admin)).filter((x) => !!x && isCorporateUser(x));
|
||||
|
||||
if (belongingGroupsAdmins.length === 0) return "";
|
||||
|
||||
Reference in New Issue
Block a user