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 12:32:25 +02:00
|
|
|
import { useI18n } from "./i18n";
|
|
|
|
|
import DefaultPage from "keycloakify/account/DefaultPage";
|
2024-06-06 05:26:06 +02:00
|
|
|
import Template from "keycloakify/account/Template";
|
2024-06-06 01:44:57 +02:00
|
|
|
|
2024-06-11 21:10:47 +02:00
|
|
|
export default function KcPage(props: { kcContext: KcContext }) {
|
2024-06-06 01:44:57 +02:00
|
|
|
const { kcContext } = props;
|
|
|
|
|
|
2024-06-09 12:32:25 +02:00
|
|
|
const { i18n } = useI18n({ kcContext });
|
|
|
|
|
|
2024-06-06 01:44:57 +02:00
|
|
|
return (
|
|
|
|
|
<Suspense>
|
|
|
|
|
{(() => {
|
|
|
|
|
switch (kcContext.pageId) {
|
|
|
|
|
default:
|
2024-06-06 05:26:06 +02:00
|
|
|
return (
|
2024-06-09 12:32:25 +02:00
|
|
|
<DefaultPage
|
2024-06-09 10:24:14 +02:00
|
|
|
kcContext={kcContext}
|
2024-06-09 12:32:25 +02:00
|
|
|
i18n={i18n}
|
2024-06-09 10:24:14 +02:00
|
|
|
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 };
|