// Copy pasted from: https://github.com/InseeFrLab/keycloakify/blob/main/src/lib/pages/RegisterUserProfile.tsx import { useState } from "react"; import { clsx } from "keycloakify/lib/tools/clsx"; import { UserProfileFormFields } from "keycloakify/lib/pages/shared/UserProfileCommons"; import type { PageProps } from "keycloakify/lib/KcProps"; import type { KcContext } from "../kcContext"; import type { I18n } from "../i18n"; export default function RegisterUserProfile(props: PageProps, I18n>) { const { kcContext, i18n, doFetchDefaultThemeResources = true, Template, ...kcProps } = props; const { url, messagesPerField, recaptchaRequired, recaptchaSiteKey } = kcContext; const { msg, msgStr } = i18n; const [isFomSubmittable, setIsFomSubmittable] = useState(false); return (