);
@@ -207,6 +209,7 @@ function DeleteAccountCard(props: {
defaultTeamSlug: string;
defaultTeamName: string;
redirectToBillingPortal: BillingBillingPortalAction;
+ cancelSubscriptions: () => Promise;
}) {
const title = "Delete Account";
const description = (
@@ -230,6 +233,10 @@ function DeleteAccountCard(props: {
},
});
+ const cancelSubscriptions = useMutation({
+ mutationFn: props.cancelSubscriptions,
+ });
+
function handleDelete() {
deleteAccount.mutate();
}
@@ -264,25 +271,47 @@ function DeleteAccountCard(props: {
Failed to delete account
-
- Your default team "{props.defaultTeamName}" has active
- subscriptions. These subscriptions have to be cancelled
- first before deleting account
-
-
- Reach out to support to help you cancel them
-
-
+
+
+ Your default team "{props.defaultTeamName}" has active
+ subscriptions. These subscriptions have to be cancelled
+ before deleting account
+
+