2022-10-10 10:14:19 +00:00
|
|
|
import "@patternfly/react-core/dist/styles/base.css";
|
2023-02-07 11:29:52 +00:00
|
|
|
import "@patternfly/patternfly/patternfly-addons.css";
|
2022-10-10 10:14:19 +00:00
|
|
|
|
|
|
|
import { StrictMode } from "react";
|
2023-02-16 10:59:03 +00:00
|
|
|
import { createRoot } from "react-dom/client";
|
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);
|
2023-02-13 07:18:16 +00:00
|
|
|
const container = document.getElementById("app");
|
2023-02-16 10:59:03 +00:00
|
|
|
const root = createRoot(container!);
|
2022-10-10 10:14:19 +00:00
|
|
|
|
2023-02-16 10:59:03 +00:00
|
|
|
root.render(
|
2022-10-10 10:14:19 +00:00
|
|
|
<StrictMode>
|
|
|
|
<RouterProvider router={router} />
|
2023-02-16 10:59:03 +00:00
|
|
|
</StrictMode>
|
2022-10-10 10:14:19 +00:00
|
|
|
);
|