From 7a19ba67e55e58fcb0769f0a400453250983fef7 Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Tue, 4 Feb 2025 14:58:24 +0100 Subject: [PATCH] fix(frontend): add disabled attribute for category delete button --- frontend/src/components/categories/index.tsx | 41 +++++++++----------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/frontend/src/components/categories/index.tsx b/frontend/src/components/categories/index.tsx index a8d6248a..02da4c0b 100644 --- a/frontend/src/components/categories/index.tsx +++ b/frontend/src/components/categories/index.tsx @@ -156,29 +156,26 @@ export const Categories = () => { ) : null} - {selectedCategories.length > 0 && ( - - - - )} + if (isConfirmed) { + deleteCategories(selectedCategories); + } + }} + disabled={!selectedCategories.length} + startIcon={} + > + {t("button.delete")} +