fixes: #29641 Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
parent
792a3457ff
commit
a650d99b2f
2 changed files with 10 additions and 3 deletions
|
@ -1,4 +1,8 @@
|
|||
import { KeycloakProvider, environment } from "@keycloak/keycloak-ui-shared";
|
||||
import {
|
||||
AccountEnvironment,
|
||||
KeycloakProvider,
|
||||
environment,
|
||||
} from "@keycloak/keycloak-ui-shared";
|
||||
import { Page, Spinner } from "@patternfly/react-core";
|
||||
import { Suspense } from "react";
|
||||
import { Outlet } from "react-router-dom";
|
||||
|
@ -7,7 +11,7 @@ import { PageNav } from "./PageNav";
|
|||
|
||||
export const Root = () => {
|
||||
return (
|
||||
<KeycloakProvider environment={environment}>
|
||||
<KeycloakProvider environment={environment as AccountEnvironment}>
|
||||
<Page header={<Header />} sidebar={<PageNav />} isManagedSidebar>
|
||||
<Suspense fallback={<Spinner />}>
|
||||
<Outlet />
|
||||
|
|
|
@ -49,7 +49,10 @@ export const KeycloakProvider = <T extends BaseEnvironment>({
|
|||
const [error, setError] = useState<unknown>();
|
||||
const keycloak = useMemo(() => {
|
||||
const keycloak = new Keycloak({
|
||||
url: environment.authUrl,
|
||||
url:
|
||||
"authServerUrl" in environment
|
||||
? (environment.authServerUrl as string)
|
||||
: environment.authUrl,
|
||||
realm: environment.realm,
|
||||
clientId: environment.clientId,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue