Added fix for missing enabled flag (#3235)

This commit is contained in:
Erik Jan de Wit 2022-09-01 00:12:29 +02:00 committed by GitHub
parent 86248f7f11
commit df072f5c15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,8 +120,14 @@ export default function UserFederationSection() {
};
if (userFederations) {
cards = userFederations.sort(cardSorter).map((userFederation, index) => {
const ufCardDropdownItems = [
cards = userFederations.sort(cardSorter).map((userFederation, index) => (
<GalleryItem
key={index}
className="keycloak-admin--user-federation__gallery-item"
>
<KeycloakCard
id={userFederation.id!}
dropdownItems={[
<DropdownItem
key={`${index}-cardDelete`}
onClick={() => {
@ -131,30 +137,23 @@ export default function UserFederationSection() {
>
{t("common:delete")}
</DropdownItem>,
];
return (
<GalleryItem
key={index}
className="keycloak-admin--user-federation__gallery-item"
>
<KeycloakCard
id={userFederation.id!}
dropdownItems={ufCardDropdownItems}
]}
providerId={userFederation.providerId!}
title={userFederation.name!}
footerText={toUpperCase(userFederation.providerId!)}
labelText={
userFederation.config!["enabled"][0] !== "false"
userFederation.config?.["enabled"]?.[0] !== "false"
? `${t("common:enabled")}`
: `${t("common:disabled")}`
}
labelColor={
userFederation.config!["enabled"][0] !== "false" ? "blue" : "gray"
userFederation.config?.["enabled"]?.[0] !== "false"
? "blue"
: "gray"
}
/>
</GalleryItem>
);
});
));
}
return (