keycloak-scim/js/apps/account-ui/src/main.tsx

30 lines
753 B
TypeScript
Raw Normal View History

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