diff --git a/js/apps/admin-ui/src/identity-providers/component/RedirectUrl.tsx b/js/apps/admin-ui/src/identity-providers/component/RedirectUrl.tsx index 3f110aa37f..f6e57e40a1 100644 --- a/js/apps/admin-ui/src/identity-providers/component/RedirectUrl.tsx +++ b/js/apps/admin-ui/src/identity-providers/component/RedirectUrl.tsx @@ -1,18 +1,16 @@ import { ClipboardCopy, FormGroup } from "@patternfly/react-core"; import { useTranslation } from "react-i18next"; -import { HelpItem } from "@keycloak/keycloak-ui-shared"; -import { useAdminClient } from "../../admin-client"; +import { HelpItem, useEnvironment } from "@keycloak/keycloak-ui-shared"; import { useRealm } from "../../context/realm-context/RealmContext"; import { addTrailingSlash } from "../../util"; export const RedirectUrl = ({ id }: { id: string }) => { - const { adminClient } = useAdminClient(); - + const { environment } = useEnvironment(); const { t } = useTranslation(); const { realm } = useRealm(); const callbackUrl = `${addTrailingSlash( - adminClient.baseUrl, + environment.serverBaseUrl, )}realms/${realm}/broker`; return (