diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index d3b76913d9..5b7cf00c6c 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -1,4 +1,3 @@ -// import { deleteTodo } from '../api/todos'; import { SortBy, Todo } from '../types'; type Props = { @@ -23,7 +22,7 @@ export const Footer: React.FC = ({ const deleteCompletedtodo = () => { try { todos.forEach(async todo => { - if (todo.completed === true) { + if (todo.completed) { handleSelectedTodo([...selectedTodo, todo.id]); } }); @@ -32,7 +31,7 @@ export const Footer: React.FC = ({ } todos.forEach(todo => { - if (todo.completed === true) { + if (todo.completed) { handleDeleteTodo(todo.id); } }); @@ -47,7 +46,7 @@ export const Footer: React.FC = ({