Update Template.tsx

This commit is contained in:
Joseph Garrone 2023-12-18 13:21:51 +01:00 committed by GitHub
parent 0c0c81d5e7
commit d5a3cf3b02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,6 @@
// Copy pasted from: https://github.com/InseeFrLab/keycloakify/blob/main/src/login/Template.tsx // Copy pasted from: https://github.com/InseeFrLab/keycloakify/blob/main/src/login/Template.tsx
import { useState } from "react";
import { assert } from "keycloakify/tools/assert"; import { assert } from "keycloakify/tools/assert";
import { clsx } from "keycloakify/tools/clsx"; import { clsx } from "keycloakify/tools/clsx";
import { usePrepareTemplate } from "keycloakify/lib/usePrepareTemplate"; import { usePrepareTemplate } from "keycloakify/lib/usePrepareTemplate";
@ -43,6 +44,8 @@ export default function Template(props: TemplateProps<KcContext, I18n>) {
"bodyClassName": getClassName("kcBodyClass") "bodyClassName": getClassName("kcBodyClass")
}); });
useState(()=> { document.title = i18n.msgStr("loginTitle", kcContext.realm.displayName); });
if (!isReady) { if (!isReady) {
return null; return null;
} }