fix: update button fix (#9106)
* update button fix * Update appearance.tsx * fix linter --------- Co-authored-by: Vinoth Kumar V <vinoth_kumar_v@Vinoths-MacBook-Pro.local> Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>pull/8925/head^2
parent
5bca02bac2
commit
1eb873bd35
|
@ -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");
|
||||
|
|
|
@ -137,4 +137,5 @@ export const updateProfileHandler = async ({ ctx, input }: UpdateProfileOptions)
|
|||
.then(() => console.info("Booking pages revalidated"))
|
||||
.catch((e) => console.error(e));
|
||||
}
|
||||
return input;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue