#51 myTask.js useState projects added

parent 316c356d
...@@ -60,16 +60,18 @@ export default function EnhancedTable() { ...@@ -60,16 +60,18 @@ export default function EnhancedTable() {
useEffect(() => { useEffect(() => {
dispatch(fetchAllTasks()); dispatch(fetchAllTasks());
dispatch(fetch)
}, [dispatch]); }, [dispatch]);
const tasks = useSelector((state) => state.tasks.tasks); const tasks = useSelector((state) => state.tasks.tasks);
console.log(tasks) console.log(tasks)
const [recievedTasks, setRecievedTasks] = useState([]); const [recievedTasks, setRecievedTasks] = useState([]);
const projects=[ const [projects,setProjects]=useState([])
"project1", // const projects=[
"project2", // "project1",
"project3" // "project2",
] // "project3"
// ]
const [order, setOrder] = React.useState("asc"); const [order, setOrder] = React.useState("asc");
const [orderBy, setOrderBy] = React.useState("id"); const [orderBy, setOrderBy] = React.useState("id");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment