Skip to content

Commit

Permalink
Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceman03 committed Sep 23, 2024
1 parent 8b9da27 commit 093c368
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/cms/src/admin/views/MerchProducts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 093c368

Please sign in to comment.