fix: update button fix (#9106)

* update button fix

* Update appearance.tsx

* fix linter

---------

Co-authored-by: Vinoth Kumar V <[email protected]>
Co-authored-by: Carina Wollendorfer <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Hariom Balhara <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-05-30 16:32:15 +02:00
1 parent 5bca02bac2
commit 1eb873bd35
2 files changed
+4 -1

No files matched your search

@@ -67,12 +67,14 @@ const AppearanceView = () => {
const {
formState: { isSubmitting, isDirty },
reset,
} = formMethods;
const mutation = trpc.viewer.updateProfile.useMutation({
onSuccess: async () => {
onSuccess: async (data) => {
await utils.viewer.me.invalidate();
showToast(t("settings_updated_successfully"), "success");
reset(data);
},
onError: () => {
showToast(t("error_updating_settings"), "error");