From fd25863e7781e7730cdafd8af005a7259d7f3a7c Mon Sep 17 00:00:00 2001 From: Okke Harsta Date: Sun, 15 Sep 2024 09:07:42 +0200 Subject: [PATCH] Simplify roles --- welcome/src/components/User.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/welcome/src/components/User.js b/welcome/src/components/User.js index 56d02b1b..947baf3c 100644 --- a/welcome/src/components/User.js +++ b/welcome/src/components/User.js @@ -20,14 +20,9 @@ export const User = ({user, invitationRoles = []}) => { const applications = reduceApplicationFromUserRoles(filteredUserRoles, I18n.locale); return ( <> - {(isEmpty(user.userRoles) && isEmpty(invitationRoles)) && -

{I18n.t("users.noRolesInfo")}

} - {!isEmpty(user.userRoles) && - <> - {applications.map((application, index) => renderApplication(application, index))} - {isEmpty(applications) && -

{I18n.t(`users.noRolesFound`)}

} - } + {applications.map((application, index) => renderApplication(application, index))} + {(isEmpty(applications) && isEmpty(invitationRoles)) && +

{I18n.t(`users.noRolesFound`)}

} ); } \ No newline at end of file