bug fixed

This commit is contained in:
Daniel
2023-07-19 16:51:53 -04:00
parent 7912815c9e
commit ae71ce2020
4 changed files with 26 additions and 28 deletions
+8 -6
View File
@@ -51,17 +51,19 @@ export default function ChangePassword({
if (response.ok) {
toast.success("Settings Applied!");
if (
user.email !== account.email ||
user.username !== account.username ||
user.name !== account.name
) {
if (user.email !== account.email) {
update({
id: data?.user.id,
});
signOut();
}
} else if (
user.username !== account.username ||
user.name !== account.name
)
update({
id: data?.user.id,
});
setUser({ ...user, newPassword: undefined });
togglePasswordFormModal();