From ffc56a680c0144b8c76680172bc86ed4a855186a Mon Sep 17 00:00:00 2001 From: Thorben <38816229+tklein1801@users.noreply.github.com> Date: Thu, 4 Jan 2024 18:11:52 +0100 Subject: [PATCH] fix: Correctly call `...confirmDelete` --- src/routes/Categories.route.tsx | 2 +- src/routes/PaymentMethods.route.tsx | 6 +++--- src/routes/Subscriptions.route.tsx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/routes/Categories.route.tsx b/src/routes/Categories.route.tsx index cc89396c..bf0e9e7d 100644 --- a/src/routes/Categories.route.tsx +++ b/src/routes/Categories.route.tsx @@ -244,7 +244,7 @@ export const Categories = () => { setShowDeleteCategoryDialog(false); setDeleteCategory(null); }} - onConfirm={() => handler.onConfirmCategoryDelete} + onConfirm={handler.onConfirmCategoryDelete} withTransition /> diff --git a/src/routes/PaymentMethods.route.tsx b/src/routes/PaymentMethods.route.tsx index e0454d1c..18518f82 100644 --- a/src/routes/PaymentMethods.route.tsx +++ b/src/routes/PaymentMethods.route.tsx @@ -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; } @@ -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( @@ -232,7 +232,7 @@ export const PaymentMethods = () => { setShowDeletePaymentMethodDialog(false); setDeletePaymentMethod(null); }} - onConfirm={() => handler.onConfirmTransactionDelete} + onConfirm={handler.onConfirmPaymentMethodDelete} withTransition /> diff --git a/src/routes/Subscriptions.route.tsx b/src/routes/Subscriptions.route.tsx index 18d90b5e..0b0ba656 100644 --- a/src/routes/Subscriptions.route.tsx +++ b/src/routes/Subscriptions.route.tsx @@ -343,7 +343,7 @@ export const Subscriptions = () => { setShowDeleteSubscriptionDialog(false); setDeleteSubscription(null); }} - onConfirm={() => handler.onConfirmSubscriptionDelete()} + onConfirm={handler.onConfirmSubscriptionDelete} withTransition />