2020-12-02 13:37:40 +00:00
|
|
|
import React from "react";
|
|
|
|
import KeycloakAdminClient from "keycloak-admin";
|
|
|
|
|
|
|
|
import { AdminClient } from "./context/auth/AdminClient";
|
|
|
|
import { WhoAmIContextProvider } from "./context/whoami/WhoAmI";
|
|
|
|
import { RealmContextProvider } from "./context/realm-context/RealmContext";
|
|
|
|
import { App } from "./App";
|
|
|
|
|
|
|
|
export type KeycloakAdminConsoleProps = {
|
|
|
|
adminClient: KeycloakAdminClient;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const KeycloakAdminConsole = ({
|
|
|
|
adminClient,
|
|
|
|
}: KeycloakAdminConsoleProps) => {
|
|
|
|
return (
|
2021-01-05 19:49:33 +00:00
|
|
|
<RealmContextProvider>
|
|
|
|
<AdminClient.Provider value={adminClient}>
|
|
|
|
<WhoAmIContextProvider>
|
2020-12-02 13:37:40 +00:00
|
|
|
<App />
|
2021-01-05 19:49:33 +00:00
|
|
|
</WhoAmIContextProvider>
|
|
|
|
</AdminClient.Provider>
|
|
|
|
</RealmContextProvider>
|
2020-12-02 13:37:40 +00:00
|
|
|
);
|
|
|
|
};
|