Keycloak
26 строк · 788.0 Байт
1import "@patternfly/react-core/dist/styles/base.css";
2import "@patternfly/patternfly/patternfly-addons.css";
3
4import { StrictMode } from "react";
5import { createRoot } from "react-dom/client";
6import { createBrowserRouter, RouterProvider } from "react-router-dom";
7
8import { environment } from "./environment";
9import { i18n } from "./i18n";
10import { routes } from "./routes";
11import { getRootPath } from "./utils/getRootPath";
12
13// Initialize required components before rendering app.
14await i18n.init();
15
16const container = document.getElementById("app");
17const root = createRoot(container!);
18
19const basename = getRootPath(environment.realm);
20const router = createBrowserRouter(routes, { basename });
21
22root.render(
23<StrictMode>
24<RouterProvider router={router} />
25</StrictMode>,
26);
27