delete all toast and modified botton add equipo
This commit is contained in:
@@ -13,22 +13,26 @@ export default function ChangePassword() {
|
||||
e.preventDefault();
|
||||
const data = { password, newPassword };
|
||||
|
||||
try{
|
||||
try {
|
||||
const response = await apiClient.post("/user/changePassword", data);
|
||||
toast.success( `${response.data.message}`)
|
||||
Swal.fire({
|
||||
title: response.data.message,
|
||||
icon: "success",
|
||||
draggable: true,
|
||||
});
|
||||
setPass('');
|
||||
setNewPass('');
|
||||
setconfirmNewPass('');
|
||||
}catch{
|
||||
|
||||
Swal.fire({
|
||||
title: "No es la contraseña actual!",
|
||||
icon: "error",
|
||||
draggable: true,
|
||||
});
|
||||
|
||||
} catch {
|
||||
|
||||
Swal.fire({
|
||||
title: "No es tu contraseña actual!",
|
||||
icon: "error",
|
||||
draggable: true,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user