Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vanvalera committed Oct 2, 2024
1 parent 6173369 commit 0807400
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<your_account>` with your GitHub username in the [DEMO LINK](https://<your_account>.github.io/react_todo-app/) and add it to the PR description.
- Replace `<your_account>` with your GitHub username in the [DEMO LINK](https://vanvalera.github.io/react_todo-app/) and add it to the PR description.
6 changes: 4 additions & 2 deletions src/components/TodoList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
});

Expand Down Expand Up @@ -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)}
/>
</label>

Expand Down

0 comments on commit 0807400

Please sign in to comment.