mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: profile picture modal close on remove functionality added and mutation fix (#4757)
This commit is contained in:
parent
b05579d506
commit
778fca9db6
@ -54,6 +54,7 @@ const ProfileSettingsPage = observer(() => {
|
|||||||
reset,
|
reset,
|
||||||
watch,
|
watch,
|
||||||
control,
|
control,
|
||||||
|
setValue,
|
||||||
formState: { errors },
|
formState: { errors },
|
||||||
} = useForm<IUser>({ defaultValues });
|
} = useForm<IUser>({ defaultValues });
|
||||||
// store hooks
|
// store hooks
|
||||||
@ -104,6 +105,7 @@ const ProfileSettingsPage = observer(() => {
|
|||||||
message: "Profile picture deleted successfully.",
|
message: "Profile picture deleted successfully.",
|
||||||
});
|
});
|
||||||
setIsRemoving(false);
|
setIsRemoving(false);
|
||||||
|
setValue("avatar", "");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
setToast({
|
setToast({
|
||||||
@ -112,7 +114,10 @@ const ProfileSettingsPage = observer(() => {
|
|||||||
message: "There was some error in deleting your profile picture. Please try again.",
|
message: "There was some error in deleting your profile picture. Please try again.",
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.finally(() => setIsRemoving(false));
|
.finally(() => {
|
||||||
|
setIsRemoving(false);
|
||||||
|
setIsImageUploadModalOpen(false);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user