add task P3#2254
Open
ArtemNosachenko wants to merge 3 commits into
Open
Conversation
2pasha
suggested changes
Jun 16, 2026
2pasha
left a comment
There was a problem hiding this comment.
good job! 👏
take a look on comments below ⬇️
| getTodos() | ||
| .then(setTodos) | ||
| .catch(() => { | ||
| setErrorMessage('Unable to load todos'); |
There was a problem hiding this comment.
move all your error messages to separate enum
Comment on lines
+292
to
+295
| onSubmit={e => { | ||
| e.preventDefault(); | ||
| handleRename(todo); | ||
| }} |
Comment on lines
+304
to
+308
| onKeyUp={e => { | ||
| if (e.key === 'Escape') { | ||
| setEditingTodoId(null); | ||
| } | ||
| }} |
Comment on lines
+316
to
+319
| onDoubleClick={() => { | ||
| setEditingTodoId(todo.id); | ||
| setEditingTitle(todo.title); | ||
| }} |
Comment on lines
+358
to
+389
| <a | ||
| href="#/" | ||
| data-cy="FilterLinkAll" | ||
| className={classNames('filter__link', { | ||
| selected: filter === FilterType.All, | ||
| })} | ||
| onClick={() => setFilter(FilterType.All)} | ||
| > | ||
| All | ||
| </a> | ||
|
|
||
| <a | ||
| href="#/active" | ||
| data-cy="FilterLinkActive" | ||
| className={classNames('filter__link', { | ||
| selected: filter === FilterType.Active, | ||
| })} | ||
| onClick={() => setFilter(FilterType.Active)} | ||
| > | ||
| Active | ||
| </a> | ||
|
|
||
| <a | ||
| href="#/completed" | ||
| data-cy="FilterLinkCompleted" | ||
| className={classNames('filter__link', { | ||
| selected: filter === FilterType.Completed, | ||
| })} | ||
| onClick={() => setFilter(FilterType.Completed)} | ||
| > | ||
| Completed | ||
| </a> |
There was a problem hiding this comment.
DRY
you may add all your filter values to kind of array and map through it
etojeDenys
suggested changes
Jun 23, 2026
etojeDenys
left a comment
There was a problem hiding this comment.
good job, but it would be better if you split the app into several components (for example, header, main section, footer and errorNotification)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://ArtemNosachenko.github.io/react_todo-app-with-api/