From 2ff01e1a304d5309c85493e7ccec9ebd6c100d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Oliva?= Date: Wed, 17 May 2023 21:29:57 -0600 Subject: Moved `ToDo.jsx` to UI folder. --- src/features/todo/ToDo.jsx | 233 --------------------------------------------- 1 file changed, 233 deletions(-) delete mode 100644 src/features/todo/ToDo.jsx (limited to 'src/features/todo') diff --git a/src/features/todo/ToDo.jsx b/src/features/todo/ToDo.jsx deleted file mode 100644 index c956ba1..0000000 --- a/src/features/todo/ToDo.jsx +++ /dev/null @@ -1,233 +0,0 @@ -import React, { useState } from "react"; -import { useSelector, useDispatch } from "react-redux"; -import { add_todo, select_todos } from "./reducer"; - -export function Reducer() { - const my_todos = useSelector(select_todos); - const dispatch = useDispatch(); - const [new_text, set_new_text] = useState(""); - const [new_done, set_new_done] = useState(false); - const [new_priority, set_new_priority] = useState("Low"); - - function handle_exit_modal() { - // https://stackoverflow.com/questions/27826381/clearing-form-input-fields-in-bootstrap - $("form").get(0).reset(); // Reset form - - set_new_text(""); - set_new_done(false); - set_new_priority("Low"); - - console.log("CLEANED."); - } - - return ( - <> -
- -
- - -
- - - - - - - - - - - - {my_todos.map((item) => ( - - - - - - - - ))} - -
#NamePriorityDue DateActions
-
- -
-
{item.text}{item.priority}{item.due_date} -
- - -
-
-
- - ); -} -- cgit v1.2.3