fix: error when unlinking google account (#15011)
Co-authored-by: Carina Wollendorfer <[email protected]>
This commit is contained in:
1 parent
51428087ef
commit
e030fe0e07
7 files changed
+140
-26
No files matched your search
@@ -124,6 +124,15 @@ const ProfileView = () => {
|
||||
}
|
||||
},
|
||||
});
|
||||
const unlinkConnectedAccountMutation = trpc.viewer.unlinkConnectedAccount.useMutation({
|
||||
onSuccess: async (res) => {
|
||||
showToast(t(res.message), "success");
|
||||
utils.viewer.me.invalidate();
|
||||
},
|
||||
onError: (e) => {
|
||||
showToast(t(e.message), "error");
|
||||
},
|
||||
});
|
||||
|
||||
const addSecondaryEmailMutation = trpc.viewer.addSecondaryEmail.useMutation({
|
||||
onSuccess: (res) => {
|
||||
@@ -439,10 +448,7 @@ const ProfileView = () => {
|
||||
<Button
|
||||
color="primary"
|
||||
onClick={() => {
|
||||
updateProfileMutation.mutate({
|
||||
...tempFormValues,
|
||||
unlinkConnectedAccount: true,
|
||||
});
|
||||
unlinkConnectedAccountMutation.mutate();
|
||||
setShowAccountDisconnectWarning(false);
|
||||
}}>
|
||||
{t("confirm")}
|
||||
|
||||
@@ -2335,6 +2335,8 @@
|
||||
"field_identifiers_as_variables": "Use field identifiers as variables for your custom event redirect",
|
||||
"field_identifiers_as_variables_with_example": "Use field identifiers as variables for your custom event redirect (e.g. {{variable}})",
|
||||
"account_already_linked": "Account is already linked",
|
||||
"account_unlinked_success": "Account unlinked successfully",
|
||||
"account_unlinked_error": "There was an error unlinking the account",
|
||||
"travel_schedule": "Travel Schedule",
|
||||
"travel_schedule_description": "Plan your trip ahead to keep your existing schedule in a different timezone and prevent being booked at midnight.",
|
||||
"schedule_timezone_change": "Schedule timezone change",
|
||||
|
||||
Reference in new issue
Block a user