From df072f5c152473d793c83856e7559cd3c235fca4 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Thu, 1 Sep 2022 00:12:29 +0200 Subject: [PATCH] Added fix for missing enabled flag (#3235) --- .../user-federation/UserFederationSection.tsx | 69 +++++++++---------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/apps/admin-ui/src/user-federation/UserFederationSection.tsx b/apps/admin-ui/src/user-federation/UserFederationSection.tsx index d6fe074dc2..5f8b75c457 100644 --- a/apps/admin-ui/src/user-federation/UserFederationSection.tsx +++ b/apps/admin-ui/src/user-federation/UserFederationSection.tsx @@ -120,41 +120,40 @@ export default function UserFederationSection() { }; if (userFederations) { - cards = userFederations.sort(cardSorter).map((userFederation, index) => { - const ufCardDropdownItems = [ - { - toggleDeleteForCard(userFederation.id!); - }} - data-testid="card-delete" - > - {t("common:delete")} - , - ]; - return ( - - - - ); - }); + cards = userFederations.sort(cardSorter).map((userFederation, index) => ( + + { + toggleDeleteForCard(userFederation.id!); + }} + data-testid="card-delete" + > + {t("common:delete")} + , + ]} + providerId={userFederation.providerId!} + title={userFederation.name!} + footerText={toUpperCase(userFederation.providerId!)} + labelText={ + userFederation.config?.["enabled"]?.[0] !== "false" + ? `${t("common:enabled")}` + : `${t("common:disabled")}` + } + labelColor={ + userFederation.config?.["enabled"]?.[0] !== "false" + ? "blue" + : "gray" + } + /> + + )); } return (