aboutsummaryrefslogtreecommitdiff
path: root/src/ToDo.jsx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ToDo.jsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ToDo.jsx b/src/ToDo.jsx
index 1dbfad7..3644db3 100644
--- a/src/ToDo.jsx
+++ b/src/ToDo.jsx
@@ -3,6 +3,7 @@ import { useSelector, useDispatch } from "react-redux";
import {
add_todo,
change_done,
+ remove_todo,
select_todos,
select_last_index,
} from "./features/todo/reducer";
@@ -241,7 +242,9 @@ export function ListToDos() {
<button
type="button"
className="btn btn-outline-dark"
- disabled
+ onClick={(e) =>
+ dispatch(remove_todo(item.id))
+ }
>
Delete
</button>