fixes the details page (#21776)
fixes: https://github.com/keycloak/keycloak/issues/15344#issuecomment-1636965834
This commit is contained in:
parent
7c9593f88a
commit
262cc33ebd
1 changed files with 16 additions and 7 deletions
|
@ -164,14 +164,23 @@ export default function DetailSettings() {
|
||||||
const [selectedMapper, setSelectedMapper] =
|
const [selectedMapper, setSelectedMapper] =
|
||||||
useState<IdPWithMapperAttributes>();
|
useState<IdPWithMapperAttributes>();
|
||||||
const serverInfo = useServerInfo();
|
const serverInfo = useServerInfo();
|
||||||
const providerInfo = useMemo(
|
const providerInfo = useMemo(() => {
|
||||||
() =>
|
const namespaces = [
|
||||||
serverInfo.componentTypes?.[
|
"org.keycloak.broker.social.SocialIdentityProvider",
|
||||||
"org.keycloak.broker.social.SocialIdentityProvider"
|
"org.keycloak.broker.provider.IdentityProvider",
|
||||||
]?.find((p) => p.id === providerId),
|
];
|
||||||
[serverInfo, providerId],
|
|
||||||
|
for (const namespace of namespaces) {
|
||||||
|
const social = serverInfo.componentTypes?.[namespace]?.find(
|
||||||
|
({ id }) => id === providerId,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (social) {
|
||||||
|
return social;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [serverInfo, providerId]);
|
||||||
|
|
||||||
const { addAlert, addError } = useAlerts();
|
const { addAlert, addError } = useAlerts();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { realm } = useRealm();
|
const { realm } = useRealm();
|
||||||
|
|
Loading…
Reference in a new issue