2024-06-09 10:24:14 +02:00
|
|
|
import { Suspense } from "react";
|
2024-06-08 09:03:17 +02:00
|
|
|
import type { ClassKey } from "keycloakify/account";
|
2024-06-06 05:26:06 +02:00
|
|
|
import type { KcContext } from "./KcContext";
|
2024-06-09 10:24:14 +02:00
|
|
|
import Fallback from "keycloakify/account/Fallback";
|
2024-06-06 05:26:06 +02:00
|
|
|
import Template from "keycloakify/account/Template";
|
2024-06-06 01:44:57 +02:00
|
|
|
|
|
|
|
|
export default function KcApp(props: { kcContext: KcContext }) {
|
|
|
|
|
const { kcContext } = props;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Suspense>
|
|
|
|
|
{(() => {
|
|
|
|
|
switch (kcContext.pageId) {
|
|
|
|
|
default:
|
2024-06-06 05:26:06 +02:00
|
|
|
return (
|
|
|
|
|
<Fallback
|
2024-06-09 10:24:14 +02:00
|
|
|
kcContext={kcContext}
|
|
|
|
|
classes={classes}
|
|
|
|
|
Template={Template}
|
2024-06-06 05:26:06 +02:00
|
|
|
doUseDefaultCss={true}
|
|
|
|
|
/>
|
|
|
|
|
);
|
2024-06-06 01:44:57 +02:00
|
|
|
}
|
|
|
|
|
})()}
|
|
|
|
|
</Suspense>
|
|
|
|
|
);
|
|
|
|
|
}
|
2024-06-09 10:24:14 +02:00
|
|
|
|
|
|
|
|
const classes = {} satisfies { [key in ClassKey]?: string };
|