Commit 2802ecb8 by Ajmal.S

changes

parent 58a4b846
import React from "react"; import React from "react";
import "./App.css"; import "./App.css";
import TodoList from "./components/TodoList"; import TodoHome from "./components/TodoHome";
function App() { function App() {
return ( return (
<div className='task-main'> <div className='task-main'>
<TodoList /> <TodoHome />
</div> </div>
); );
} }
......
import React from "react"; import React from "react";
import { CgCloseO } from "react-icons/cg"; import { CgCloseO } from "react-icons/cg";
const Todo = ({ const CompletedTodos = ({
todos, todos,
completeTodo, completeTodo,
removeTodo, removeTodo,
...@@ -30,4 +30,4 @@ const Todo = ({ ...@@ -30,4 +30,4 @@ const Todo = ({
)); ));
}; };
export default Todo; export default CompletedTodos;
import React, { useState } from "react"; import React, { useState } from "react";
import TodoForm from "./TodoForm"; import TodoForm from "./TodoForm";
import Todo from "./Todo"; import TodoItem from "./TodoItem";
import Header from "./Header"; import Header from "./Header";
import CompletedTodos from "./CompletedTodos" import CompletedTodos from "./CompletedTodos"
function TodoList() { function TodoHome() {
const [todos, setTodos] = useState([]); const [todos, setTodos] = useState([]);
const [editId, setEdit] = useState(false); const [editId, setEdit] = useState(false);
...@@ -54,7 +54,7 @@ function TodoList() { ...@@ -54,7 +54,7 @@ function TodoList() {
<> <>
<Header todos={todos} /> <Header todos={todos} />
<Todo <TodoItem
todos={todos} todos={todos}
completeTodo={completeTodo} completeTodo={completeTodo}
removeTodo={removeTodo} removeTodo={removeTodo}
...@@ -75,4 +75,4 @@ function TodoList() { ...@@ -75,4 +75,4 @@ function TodoList() {
); );
} }
export default TodoList; export default TodoHome;
import React from "react"; import React from "react";
import { CgCloseO } from "react-icons/cg"; import { CgCloseO } from "react-icons/cg";
const CompletedTodos = ({ const TodoItem = ({
todos, todos,
completeTodo, completeTodo,
removeTodo, removeTodo,
...@@ -51,4 +51,4 @@ const CompletedTodos = ({ ...@@ -51,4 +51,4 @@ const CompletedTodos = ({
)); ));
}; };
export default CompletedTodos; export default TodoItem;
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