From 16c846fd97e9659d494501987a11ebd85019f99c Mon Sep 17 00:00:00 2001 From: EdwardLinS <63514282+EdwardLinS@users.noreply.github.com> Date: Mon, 27 May 2024 13:06:38 -0700 Subject: [PATCH] Fix item delete function typing --- .../src/app/components/CategoryContainer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin-portal-frontend/src/app/components/CategoryContainer.tsx b/admin-portal-frontend/src/app/components/CategoryContainer.tsx index dedf5e5..2bf210c 100644 --- a/admin-portal-frontend/src/app/components/CategoryContainer.tsx +++ b/admin-portal-frontend/src/app/components/CategoryContainer.tsx @@ -18,7 +18,7 @@ type CategoryItemProps = { title: string; visibility?: boolean; pages: number; - onDeleteCategory: (categoryId: string) => void; + onDeleteCategory: (categoryId: string) => Promise; }; const CategoryItem: React.FC = ({ id, title, pages, onDeleteCategory }) => { @@ -92,7 +92,7 @@ const CategoryItem: React.FC = ({ id, title, pages, onDeleteC export const CategoryContainer: React.FC<{ items: Category[]; type: string; - onDeleteCategory: (categoryId: string) => Promise | void; + onDeleteCategory: (categoryId: string) => Promise; }> = ({ items: categories, type, onDeleteCategory }) => { return (