2022-10-10 10:14:19 +00:00
|
|
|
import "@patternfly/react-core/dist/styles/base.css";
|
|
|
|
|
|
|
|
import { StrictMode } from "react";
|
2022-11-18 16:13:39 +00:00
|
|
|
import { render } from "react-dom";
|
2022-10-10 10:14:19 +00:00
|
|
|
import { createBrowserRouter, RouterProvider } from "react-router-dom";
|
|
|
|
|
|
|
|
import { i18n } from "./i18n";
|
2022-11-03 14:06:26 +00:00
|
|
|
import { keycloak } from "./keycloak";
|
2022-10-10 10:14:19 +00:00
|
|
|
import { routes } from "./routes";
|
|
|
|
|
2022-11-03 14:06:26 +00:00
|
|
|
// Initialize required components before rendering app.
|
|
|
|
await Promise.all([
|
|
|
|
keycloak.init({
|
|
|
|
onLoad: "check-sso",
|
|
|
|
pkceMethod: "S256",
|
|
|
|
}),
|
|
|
|
i18n.init(),
|
|
|
|
]);
|
2022-10-10 10:14:19 +00:00
|
|
|
|
|
|
|
const router = createBrowserRouter(routes);
|
|
|
|
|
2022-11-18 16:13:39 +00:00
|
|
|
render(
|
2022-10-10 10:14:19 +00:00
|
|
|
<StrictMode>
|
|
|
|
<RouterProvider router={router} />
|
|
|
|
</StrictMode>,
|
|
|
|
document.getElementById("app")
|
|
|
|
);
|