Skip to content

Commit

Permalink
Fix lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceman03 committed Sep 13, 2024
1 parent 04c5484 commit 9919a34
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions apps/cms/src/admin/views/MerchProducts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,9 @@ const MerchProducts: AdminViewComponent = ({ user, canAccessAdmin }) => {
accessor: "delete",
components: {
Heading: <div>Delete</div>,
// eslint-disable-next-line @typescript-eslint/no-misused-promises
renderCell: (data: Product) => (
<Button onClick={() => {
// Wrap async function call in an inline function
(async () => {
await handleDelete(data);
})();
}}
>Delete</Button>
<Button onClick={() => handleDelete(data)}>Delete</Button>

Check failure on line 98 in apps/cms/src/admin/views/MerchProducts.tsx

View workflow job for this annotation

GitHub Actions / Lint, Build and Test

Promise-returning function provided to attribute where a void return was expected
),
},
label: "Delete",
Expand Down

0 comments on commit 9919a34

Please sign in to comment.