import React, { ChangeEvent } from 'react' import { Lock, KeyRound, CheckCircle2, AlertTriangle, Eye, EyeOff } from 'lucide-react' import { useTranslation } from '../i18n' import { useResetPassword } from './resetPassword/useResetPassword' const inputBase: React.CSSProperties = { width: '100%', padding: '11px 44px 11px 38px', borderRadius: 12, border: '1px solid #e5e7eb', fontSize: 14, fontFamily: 'inherit', outline: 'none', transition: 'border-color 120ms', background: 'white', color: '#111827', } const ResetPasswordPage: React.FC = () => { const { t } = useTranslation() // Page = wiring container: token, form state, validation + submit live in the hook. const { navigate, token, pw, setPw, pw2, setPw2, showPw, setShowPw, mfaCode, setMfaCode, mfaRequired, error, success, isLoading, handleSubmit, } = useResetPassword() const shell = (inner: React.ReactNode) => (
{t('login.resetPasswordSuccessBody')}
{t('login.resetPasswordInvalidLinkBody')}
{mfaRequired ? t('login.resetPasswordMfaBody') : t('login.resetPasswordBody')}
{error && (