+ {/* Header icon */}
+
+
+
+
+
+
{t('profile.changeEmail.title')}
+
+ {step === 'email' && t('profile.changeEmail.description')}
+ {step === 'code' && t('profile.changeEmail.enterCodeDescription')}
+ {step === 'success' && t('profile.changeEmail.successDescription')}
+
+
+
+
+ {/* Current email display */}
+ {step === 'email' && (
+
+
{t('profile.changeEmail.currentEmail')}
+
{currentEmail}
+
+ )}
+
+ {/* Email input step */}
+ {step === 'email' && (
+
+
+
+ setNewEmail(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter') {
+ e.preventDefault();
+ handleSendCode();
+ }
+ }}
+ placeholder="new@email.com"
+ className="input w-full"
+ autoComplete="email"
+ autoFocus
+ />
+
+
+
+
+ )}
+
+ {/* Code verification step */}
+ {step === 'code' && (
+
+
+
+ {t('profile.changeEmail.codeSentTo', { email: newEmail })}
+
+
+
+
+
+ setCode(e.target.value.replace(/\D/g, ''))}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter') {
+ e.preventDefault();
+ handleVerifyCode();
+ }
+ }}
+ placeholder="000000"
+ maxLength={6}
+ className="input w-full text-center text-2xl tracking-[0.5em]"
+ autoComplete="one-time-code"
+ autoFocus
+ />
+
+
+
+
+
+
+
+
+
+ )}
+
+ {/* Success step */}
+ {step === 'success' && (
+
+
+
+
+
+
+ {t('profile.changeEmail.success')}
+
+
{newEmail}
+
+
+
+
+ )}
+
+ {/* Error message */}
+ {error && (
+
+ )}
+
+ );
+
+ // Render modal based on screen size
+ const modalContent = isMobileScreen ? (
+ <>
+ {/* Backdrop */}
+