1
import { Page } from "@patternfly/react-core";
2
import { PropsWithChildren, Suspense } from "react";
3
import { Outlet } from "react-router-dom";
4
import { Help, mainPageContentId } from "ui-shared";
6
import { Header } from "./PageHeader";
7
import { PageNav } from "./PageNav";
8
import { AlertProvider } from "./components/alert/Alerts";
9
import { PageBreadCrumbs } from "./components/bread-crumb/PageBreadCrumbs";
10
import { ErrorRenderer } from "./components/error/ErrorRenderer";
11
import { KeycloakSpinner } from "./components/keycloak-spinner/KeycloakSpinner";
13
ErrorBoundaryFallback,
14
ErrorBoundaryProvider,
15
} from "./context/ErrorBoundary";
16
import { RealmsProvider } from "./context/RealmsContext";
17
import { RecentRealmsProvider } from "./context/RecentRealms";
18
import { AccessContextProvider } from "./context/access/Access";
19
import { RealmContextProvider } from "./context/realm-context/RealmContext";
20
import { ServerInfoProvider } from "./context/server-info/ServerInfoProvider";
21
import { WhoAmIContextProvider } from "./context/whoami/WhoAmI";
22
import { SubGroups } from "./groups/SubGroupsContext";
23
import { AuthWall } from "./root/AuthWall";
25
const AppContexts = ({ children }: PropsWithChildren) => (
26
<ErrorBoundaryProvider>
28
<RealmContextProvider>
29
<WhoAmIContextProvider>
31
<RecentRealmsProvider>
32
<AccessContextProvider>
35
<SubGroups>{children}</SubGroups>
38
</AccessContextProvider>
39
</RecentRealmsProvider>
41
</WhoAmIContextProvider>
42
</RealmContextProvider>
44
</ErrorBoundaryProvider>
47
export const App = () => {
54
breadcrumb={<PageBreadCrumbs />}
55
mainContainerId={mainPageContentId}
57
<ErrorBoundaryFallback fallback={ErrorRenderer}>
58
<Suspense fallback={<KeycloakSpinner />}>
63
</ErrorBoundaryFallback>