i18n need to be passed as props if we want to be able to ovewrite

This commit is contained in:
Joseph Garrone
2024-06-09 11:20:45 +02:00
parent 2015882688
commit 7a040935e9
57 changed files with 310 additions and 246 deletions

View File

@ -1,6 +1,7 @@
import React from "react";
import Fallback from "../../dist/login/Fallback";
import type { KcContext } from "./KcContext";
import { useI18n } from "./i18n";
import { useDownloadTerms } from "../../dist/login/lib/useDownloadTerms";
import Template from "../../dist/login/Template";
import UserProfileFormFields from "../../dist/login/UserProfileFormFields";
@ -8,6 +9,8 @@ import UserProfileFormFields from "../../dist/login/UserProfileFormFields";
export default function KcApp(props: { kcContext: KcContext }) {
const { kcContext } = props;
const { i18n } = useI18n({ kcContext });
useDownloadTerms({
kcContext,
downloadTermsMarkdown: async ({ currentLanguageTag }) => {
@ -36,6 +39,7 @@ export default function KcApp(props: { kcContext: KcContext }) {
return (
<Fallback
kcContext={kcContext}
i18n={i18n}
Template={Template}
doUseDefaultCss={true}
UserProfileFormFields={UserProfileFormFields}