From 093c368dff467049f2f839e56c066937d01230a5 Mon Sep 17 00:00:00 2001 From: ZhiXuan Date: Mon, 23 Sep 2024 15:12:29 +0800 Subject: [PATCH] Fix error --- apps/cms/src/admin/views/MerchProducts.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/cms/src/admin/views/MerchProducts.tsx b/apps/cms/src/admin/views/MerchProducts.tsx index 35eedc43..0b3d5530 100644 --- a/apps/cms/src/admin/views/MerchProducts.tsx +++ b/apps/cms/src/admin/views/MerchProducts.tsx @@ -109,13 +109,13 @@ const MerchProducts: AdminViewComponent = ({ user, canAccessAdmin }) => { tableCols.push(deleteColumn); - const handleDelete = async (data: Product) => { + const handleDelete = (data: Product) => { const productId = data.id; try { // Show a confirmation prompt (optional) if (window.confirm('Are you sure you want to delete this product?')) { // Call the delete API - // Implement delete function + // Implement delete API // After deletion, update the data state to reflect the removal setData((prevData) => prevData.filter((product) => product.id !== productId));