Make the user return the actual language of the terms for accesibility

This commit is contained in:
Joseph Garrone
2024-06-07 02:20:12 +02:00
parent f0cdb0b80b
commit 2421ac2c11
3 changed files with 40 additions and 25 deletions

View File

@ -18,15 +18,15 @@ export default function Terms(props: PageProps<Extract<KcContext, { pageId: "ter
const { url } = kcContext;
const { termsMarkdown } = useTermsMarkdown();
const { isDownloadComplete, termsMarkdown, termsLanguageTag } = useTermsMarkdown();
if (termsMarkdown === undefined) {
if (!isDownloadComplete) {
return null;
}
return (
<Template {...{ kcContext, i18n, doUseDefaultCss, classes }} displayMessage={false} headerNode={msg("termsTitle")}>
<div id="kc-terms-text">
<div id="kc-terms-text" lang={termsLanguageTag}>
<Markdown>{termsMarkdown}</Markdown>
</div>
<form className="form-actions" action={url.loginAction} method="POST">