diff --git a/README.md b/README.md index 903c876f9..7982022ec 100644 --- a/README.md +++ b/README.md @@ -33,4 +33,4 @@ Implement a simple [TODO app](https://mate-academy.github.io/react_todo-app/) th - Implement a solution following the [React task guidelines](https://github.com/mate-academy/react_task-guideline#react-tasks-guideline). - Use the [React TypeScript cheat sheet](https://mate-academy.github.io/fe-program/js/extra/react-typescript). - Open another terminal and run tests with `npm test` to ensure your solution is correct. -- Replace `` with your GitHub username in the [DEMO LINK](https://.github.io/react_todo-app/) and add it to the PR description. +- Replace `` with your GitHub username in the [DEMO LINK](https://vanvalera.github.io/react_todo-app/) and add it to the PR description. diff --git a/src/components/TodoList.tsx b/src/components/TodoList.tsx index 5617ccc72..e3dff9e51 100644 --- a/src/components/TodoList.tsx +++ b/src/components/TodoList.tsx @@ -21,8 +21,10 @@ export const TodoList: React.FC = () => { return !todo.completed; case Filter.COMPLETED: return todo.completed; - default: + case Filter.ALL: return true; + default: + return false; } }); @@ -68,7 +70,7 @@ export const TodoList: React.FC = () => { type="checkbox" className="todo__status" checked={todo.completed} - onClick={() => toggleTodoCompleted(todo.id)} + onChange={() => toggleTodoCompleted(todo.id)} />