From 19f07e834e68c6924e19589641e5b138b0535e53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Oliva?= Date: Sat, 27 May 2023 14:26:14 -0600 Subject: "Done" can now only be changed on table. Not on "edit to do" or "new to do". --- src/ToDo-UI/ListToDo.jsx | 19 ------------------- src/ToDo-UI/NewToDo.jsx | 16 +--------------- src/features/todo/reducer.js | 3 +-- 3 files changed, 2 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/ToDo-UI/ListToDo.jsx b/src/ToDo-UI/ListToDo.jsx index 7c2ccba..c77c64b 100644 --- a/src/ToDo-UI/ListToDo.jsx +++ b/src/ToDo-UI/ListToDo.jsx @@ -143,14 +143,12 @@ export function ListToDos() { const [edit_id, set_edit_id] = useState(-1); const [edit_text, set_edit_text] = useState(""); const [edit_due_date, set_edit_due_date] = useState(""); - const [edit_done, set_edit_done] = useState(false); const [edit_priority, set_edit_priority] = useState("Low"); function handle_open_modal(id, text, due_date, done, priority) { set_edit_id(id); set_edit_text(text); set_edit_due_date(due_date); - set_edit_done(done); set_edit_priority(priority); } function handle_exit_modal() { @@ -159,7 +157,6 @@ export function ListToDos() { set_edit_id(-1); set_edit_text(""); - set_edit_done(false); set_edit_priority("Low"); } function handle_edit_todo() { @@ -168,7 +165,6 @@ export function ListToDos() { id: edit_id, text: edit_text, due_date: edit_due_date, - done: edit_done, priority: edit_priority, }) ); @@ -286,21 +282,6 @@ export function ListToDos() { -
- set_edit_done(e.target.checked)} - checked={edit_done} - /> - -
{ @@ -139,17 +136,6 @@ export function NewToDo() {
-
- set_new_done(e.target.checked)} - /> - -