keycloak-scim/apps/account-ui/src/main.tsx
2023-02-07 12:29:52 +01:00

28 lines
690 B
TypeScript

import "@patternfly/react-core/dist/styles/base.css";
import "@patternfly/patternfly/patternfly-addons.css";
import { StrictMode } from "react";
import { render } from "react-dom";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import { i18n } from "./i18n";
import { keycloak } from "./keycloak";
import { routes } from "./routes";
// Initialize required components before rendering app.
await Promise.all([
keycloak.init({
onLoad: "check-sso",
pkceMethod: "S256",
}),
i18n.init(),
]);
const router = createBrowserRouter(routes);
render(
<StrictMode>
<RouterProvider router={router} />
</StrictMode>,
document.getElementById("app")
);