From 5129230f76a6c20a1dc527e812ab20adaeb372b0 Mon Sep 17 00:00:00 2001 From: kir4che Date: Tue, 23 Jan 2024 03:57:35 +0800 Subject: [PATCH] Update --- client/src/pages/admin/dashboard/index.tsx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/client/src/pages/admin/dashboard/index.tsx b/client/src/pages/admin/dashboard/index.tsx index defcd6a..20bb1ad 100644 --- a/client/src/pages/admin/dashboard/index.tsx +++ b/client/src/pages/admin/dashboard/index.tsx @@ -56,16 +56,6 @@ const Dashboard = () => { if (productLoading || postLoading || orderLoading) return else if ((!productLoading && !products) || (!postLoading && !posts) || (!orderLoading && !orders)) return - const handleFormOpen = (item, data) => { - if (item === 'products') { - setProductForm(data) - setIsAddOrEditProductForm(data.title === '' ? 'add' : 'edit') - } else { - setPostForm(data) - setIsAddOrEditPostForm(data.title === '' ? 'add' : 'edit') - } - } - const handleFormUpdate = async (item: string, todo: string) => { if (todo === 'add') { try {