Skip to content

Commit

Permalink
Small fix on account removal page (#84)
Browse files Browse the repository at this point in the history
* use latest iOS SDK

* Implement removeAccount function

* Small fix on RemoveAccount
  • Loading branch information
arash817 authored Apr 22, 2024
1 parent 62958c7 commit 5df70eb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mobile/src/screens/RemoveAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,21 @@ export function RemoveAccount() {

const removeAccount = async () => {
setIsLoading(true);

try {
const response = await paymentsApi.delete("/api/customers");
if (response.status === 201) {
showSuccessNotification("Account removed successfully");
} else {
showErrorNotification(
"Account removal failed. please contact support."
"Account removal failed. Please contact support."
);
}
auth?.logout();
} catch (error) {
showErrorNotification("Account removal failed. please contact support.");
auth?.logout();
showErrorNotification("Account removal failed. Please contact support.");
}

auth?.logout();
setIsLoading(false);
};

Expand Down

0 comments on commit 5df70eb

Please sign in to comment.