From f426b8e34e36fccf22ebc8621c0f163921c4c2eb Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 31 Jan 2026 01:56:38 +0100 Subject: [PATCH] Fix: change password. --- src/pages/Perfil.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pages/Perfil.jsx b/src/pages/Perfil.jsx index 6545f90..31d7042 100644 --- a/src/pages/Perfil.jsx +++ b/src/pages/Perfil.jsx @@ -141,6 +141,7 @@ const PerfilContent = ({ config }) => { const [newPasswordData, setNewPasswordData] = useState({ oldPassword: "", newPassword: "", + confirmNewPassword: "", serviceId: identity.account.serviceId }); @@ -161,13 +162,14 @@ const PerfilContent = ({ config }) => { await postData(config.changePasswordUrl, { oldPassword: newPasswordData.oldPassword, newPassword: newPasswordData.newPassword, - serviceId: identity.user.account.serviceId + serviceId: identity.account.serviceId }); setNewPasswordData({ oldPassword: "", newPassword: "", - serviceId: identity.user.account.serviceId + confirmNewPassword: "", + serviceId: identity.account.serviceId }); setFeedbackModal({ @@ -320,7 +322,7 @@ const PerfilContent = ({ config }) => { onChange={handleChange} type={showOld ? "text" : "password"} placeholder="" - name="currentPassword" + name="oldPassword" className="rounded-4" isInvalid={!!fieldErrors?.oldPassword} /> @@ -390,7 +392,7 @@ const PerfilContent = ({ config }) => {