MCPcopy Create free account
hub / github.com/GreatStackDev/project-management / handleDelete

Function handleDelete

src/components/ProjectTasks.jsx:76–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected