Skip to content

Commit

Permalink
fix: Correctly call ...confirmDelete
Browse files Browse the repository at this point in the history
  • Loading branch information
tklein1801 committed Jan 4, 2024
1 parent 15f6210 commit ffc56a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/routes/Categories.route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export const Categories = () => {
setShowDeleteCategoryDialog(false);
setDeleteCategory(null);
}}
onConfirm={() => handler.onConfirmCategoryDelete}
onConfirm={handler.onConfirmCategoryDelete}
withTransition
/>

Expand Down
6 changes: 3 additions & 3 deletions src/routes/PaymentMethods.route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { DescriptionTableCellStyle } from '@/style/DescriptionTableCell.style';
interface IPaymentMethodsHandler {
onSearch: (keyword: string) => void;
onPaymentMethodDelete: (paymentMethod: TPaymentMethod) => void;
onConfirmTransactionDelete: () => void;
onConfirmPaymentMethodDelete: () => void;
onEditPaymentMethod: (paymentMethod: TPaymentMethod) => void;
pagination: PaginationHandler;
}
Expand Down Expand Up @@ -77,7 +77,7 @@ export const PaymentMethods = () => {
setShowEditPaymentMethodDrawer(true);
setEditPaymentMethod(paymentMethod);
},
async onConfirmTransactionDelete() {
async onConfirmPaymentMethodDelete() {
try {
if (!deletePaymentMethod) return;
const [deletedItem, error] = await PaymentMethodService.delete(
Expand Down Expand Up @@ -232,7 +232,7 @@ export const PaymentMethods = () => {
setShowDeletePaymentMethodDialog(false);
setDeletePaymentMethod(null);
}}
onConfirm={() => handler.onConfirmTransactionDelete}
onConfirm={handler.onConfirmPaymentMethodDelete}
withTransition
/>

Expand Down
2 changes: 1 addition & 1 deletion src/routes/Subscriptions.route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export const Subscriptions = () => {
setShowDeleteSubscriptionDialog(false);
setDeleteSubscription(null);
}}
onConfirm={() => handler.onConfirmSubscriptionDelete()}
onConfirm={handler.onConfirmSubscriptionDelete}
withTransition
/>

Expand Down

0 comments on commit ffc56a6

Please sign in to comment.