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] =
|
||||
useState<IdPWithMapperAttributes>();
|
||||
const serverInfo = useServerInfo();
|
||||
const providerInfo = useMemo(
|
||||
() =>
|
||||
serverInfo.componentTypes?.[
|
||||
"org.keycloak.broker.social.SocialIdentityProvider"
|
||||
]?.find((p) => p.id === providerId),
|
||||
[serverInfo, providerId],
|
||||
const providerInfo = useMemo(() => {
|
||||
const namespaces = [
|
||||
"org.keycloak.broker.social.SocialIdentityProvider",
|
||||
"org.keycloak.broker.provider.IdentityProvider",
|
||||
];
|
||||
|
||||
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 navigate = useNavigate();
|
||||
const { realm } = useRealm();
|
||||
|
|
Loading…
Reference in a new issue