()
| 74 | }; |
| 75 | |
| 76 | const handleDelete = async () => { |
| 77 | try { |
| 78 | const confirm = window.confirm("Are you sure you want to delete the selected tasks?"); |
| 79 | if (!confirm) return; |
| 80 | |
| 81 | toast.loading("Deleting tasks..."); |
| 82 | |
| 83 | // Simulate API call |
| 84 | await new Promise((resolve) => setTimeout(resolve, 2000)); |
| 85 | |
| 86 | dispatch(deleteTask(selectedTasks)); |
| 87 | |
| 88 | toast.dismissAll(); |
| 89 | toast.success("Tasks deleted successfully"); |
| 90 | } catch (error) { |
| 91 | toast.dismissAll(); |
| 92 | toast.error(error?.response?.data?.message || error.message); |
| 93 | } |
| 94 | }; |
| 95 | |
| 96 | return ( |
| 97 | <div> |
nothing calls this directly
no outgoing calls
no test coverage detected