parent
193439788e
commit
e5123ea9de
2 changed files with 3 additions and 10 deletions
|
@ -1,8 +1,4 @@
|
|||
import {
|
||||
AccountEnvironment,
|
||||
KeycloakProvider,
|
||||
environment,
|
||||
} from "@keycloak/keycloak-ui-shared";
|
||||
import { KeycloakProvider, environment } from "@keycloak/keycloak-ui-shared";
|
||||
import { Page, Spinner } from "@patternfly/react-core";
|
||||
import { Suspense } from "react";
|
||||
import { Outlet } from "react-router-dom";
|
||||
|
@ -11,7 +7,7 @@ import { PageNav } from "./PageNav";
|
|||
|
||||
export const Root = () => {
|
||||
return (
|
||||
<KeycloakProvider environment={environment as AccountEnvironment}>
|
||||
<KeycloakProvider environment={environment}>
|
||||
<Page header={<Header />} sidebar={<PageNav />} isManagedSidebar>
|
||||
<Suspense fallback={<Spinner />}>
|
||||
<Outlet />
|
||||
|
|
|
@ -49,10 +49,7 @@ export const KeycloakProvider = <T extends BaseEnvironment>({
|
|||
const [error, setError] = useState<unknown>();
|
||||
const keycloak = useMemo(() => {
|
||||
const keycloak = new Keycloak({
|
||||
url:
|
||||
"authServerUrl" in environment
|
||||
? (environment.authServerUrl as string)
|
||||
: environment.authUrl,
|
||||
url: environment.authUrl,
|
||||
realm: environment.realm,
|
||||
clientId: environment.clientId,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue