Skip to content

Commit

Permalink
Simplify roles
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Sep 15, 2024
1 parent 683d4a7 commit fd25863
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions welcome/src/components/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,9 @@ export const User = ({user, invitationRoles = []}) => {
const applications = reduceApplicationFromUserRoles(filteredUserRoles, I18n.locale);
return (
<>
{(isEmpty(user.userRoles) && isEmpty(invitationRoles)) &&
<p className={"span-row "}>{I18n.t("users.noRolesInfo")}</p>}
{!isEmpty(user.userRoles) &&
<>
{applications.map((application, index) => renderApplication(application, index))}
{isEmpty(applications) &&
<p>{I18n.t(`users.noRolesFound`)}</p>}
</>}
{applications.map((application, index) => renderApplication(application, index))}
{(isEmpty(applications) && isEmpty(invitationRoles)) &&
<p>{I18n.t(`users.noRolesFound`)}</p>}
</>
);
}

0 comments on commit fd25863

Please sign in to comment.