import { useState, memo } from "react"; import { Template } from "./Template"; import type { KcPagesProperties } from "./KcProperties"; import { defaultKcPagesProperties } from "./KcProperties"; import { assert } from "evt/tools/typeSafety/assert"; import { kcContext } from "../kcContext"; import { useKcTranslation } from "../i18n/useKcTranslation"; import { cx } from "tss-react"; export type RegisterPageProps = { kcProperties?: KcPagesProperties; }; export const Register = memo((props: RegisterPageProps) => { const { kcProperties = {} } = props; const { t, tStr } = useKcTranslation(); Object.assign(kcProperties, defaultKcPagesProperties); const [{ url, messagesPerField, register, realm, passwordRequired, recaptchaRequired, recaptchaSiteKey }] = useState(() => ( assert( kcContext !== undefined, "App is currently being served by keycloak" ), kcContext )); return (