2020-09-01 14:51:59 +00:00
|
|
|
import React from "react";
|
|
|
|
import ReactDom from "react-dom";
|
2020-09-10 18:04:03 +00:00
|
|
|
import i18n from "./i18n";
|
2020-08-04 12:59:41 +00:00
|
|
|
|
2020-09-01 14:51:59 +00:00
|
|
|
import { App } from "./App";
|
|
|
|
import init from "./auth/keycloak";
|
|
|
|
import { KeycloakContext } from "./auth/KeycloakContext";
|
|
|
|
import { KeycloakService } from "./auth/keycloak.service";
|
|
|
|
import { HttpClientContext } from "./http-service/HttpClientContext";
|
|
|
|
import { HttpClient } from "./http-service/http-client";
|
2020-08-04 12:59:41 +00:00
|
|
|
|
2020-09-10 18:04:03 +00:00
|
|
|
console.info("supported languages", ...i18n.languages);
|
2020-08-04 12:59:41 +00:00
|
|
|
init().then((keycloak) => {
|
|
|
|
const keycloakService = new KeycloakService(keycloak);
|
|
|
|
ReactDom.render(
|
2020-09-10 18:04:03 +00:00
|
|
|
<KeycloakContext.Provider value={keycloakService}>
|
|
|
|
<HttpClientContext.Provider value={new HttpClient(keycloakService)}>
|
|
|
|
<App />
|
|
|
|
</HttpClientContext.Provider>
|
|
|
|
</KeycloakContext.Provider>,
|
2020-09-01 14:51:59 +00:00
|
|
|
document.getElementById("app")
|
2020-08-04 12:59:41 +00:00
|
|
|
);
|
|
|
|
});
|