fix(webapp): code cleanup

This commit is contained in:
Ahmed Bouhuolia
2023-09-22 15:25:56 +02:00
parent ce41845bd7
commit 92ac0dbd25
12 changed files with 32 additions and 24 deletions

View File

@@ -7,7 +7,6 @@ import { useDeleteTaxRate } from '@/hooks/query/taxRates';
import withAlertStoreConnect from '@/containers/Alert/withAlertStoreConnect';
import withAlertActions from '@/containers/Alert/withAlertActions';
import withItemsActions from '@/containers/Items/withItemsActions';
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
import { compose } from '@/utils';
@@ -51,7 +50,10 @@ function TaxRateDeleteAlert({
data: { errors },
},
}) => {
// handleDeleteErrors(errors);
AppToaster.show({
message: 'Something went wrong.',
intent: Intent.DANGER,
});
},
)
.finally(() => {
@@ -86,6 +88,5 @@ function TaxRateDeleteAlert({
export default compose(
withAlertStoreConnect(),
withAlertActions,
withItemsActions,
withDrawerActions,
)(TaxRateDeleteAlert);

View File

@@ -4,8 +4,6 @@ import React from 'react';
const TaxRateDeleteAlert = React.lazy(() => import('./TaxRateDeleteAlert'));
/**
* Project alerts.
* Tax rates alerts.
*/
export default [
{ name: 'tax-rate-delete', component: TaxRateDeleteAlert },
];
export default [{ name: 'tax-rate-delete', component: TaxRateDeleteAlert }];