import { useState } from "react"; import type { LazyOrNot } from "keycloakify/tools/LazyOrNot"; import { getKcClsx, type KcClsx } from "keycloakify/login/lib/kcClsx"; import type { UserProfileFormFieldsProps } from "keycloakify/login/UserProfileFormFields"; import type { PageProps } from "keycloakify/login/pages/PageProps"; import type { KcContext } from "../KcContext"; import { useI18n, type I18n } from "../i18n"; type UpdateEmailProps = PageProps> & { UserProfileFormFields: LazyOrNot<(props: UserProfileFormFieldsProps) => JSX.Element>; }; export default function UpdateEmail(props: UpdateEmailProps) { const { kcContext, doUseDefaultCss, Template, classes, UserProfileFormFields } = props; const { kcClsx } = getKcClsx({ doUseDefaultCss, classes }); const i18n = useI18n({ kcContext }); const { msg, msgStr } = i18n; const [isFormSubmittable, setIsFormSubmittable] = useState(false); const { url, messagesPerField, isAppInitiatedAction } = kcContext; return ( ); } function LogoutOtherSessions(props: { kcClsx: KcClsx; i18n: I18n }) { const { kcClsx, i18n } = props; const { msg } = i18n; return (
); }