fix(Currencies): Currencies preferences.

This commit is contained in:
a.bouhuolia
2021-03-23 21:28:58 +02:00
parent 5855d3f368
commit 96f20bf51b
25 changed files with 153 additions and 292 deletions

View File

@@ -45,7 +45,13 @@ function CurrencyDeleteAlert({
});
closeAlert(name);
})
.catch(() => {
.catch(({ response: { data: { errors } } }) => {
if (errors.find(e => e.type === 'CANNOT_DELETE_BASE_CURRENCY')) {
AppToaster.show({
intent: Intent.DANGER,
message: 'Cannot delete the base currency.'
});
}
closeAlert(name);
});
};