Skip to content

TODO part 1#2420

Open
masteryada378 wants to merge 2 commits into
mate-academy:masterfrom
masteryada378:develop
Open

TODO part 1#2420
masteryada378 wants to merge 2 commits into
mate-academy:masterfrom
masteryada378:develop

Conversation

@masteryada378

Copy link
Copy Markdown

@etojeDenys etojeDenys left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks good, but the demo does not work. please fix it and request the review again

Comment thread src/App.tsx Outdated
setErrorMessage('');
getTodos()
.then(setTodos)
.catch(() => showError('Unable to load todos'));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create an enum for errors as well

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread src/components/Filter.tsx Outdated
Comment on lines +13 to +42
<a
href="#/"
className={classNames('filter__link', {
selected: filter === FilterType.All,
})}
data-cy="FilterLinkAll"
onClick={() => onFilterChange(FilterType.All)}
>
All
</a>
<a
href="#/active"
className={classNames('filter__link', {
selected: filter === FilterType.Active,
})}
data-cy="FilterLinkActive"
onClick={() => onFilterChange(FilterType.Active)}
>
Active
</a>
<a
href="#/completed"
className={classNames('filter__link', {
selected: filter === FilterType.Completed,
})}
data-cy="FilterLinkCompleted"
onClick={() => onFilterChange(FilterType.Completed)}
>
Completed
</a>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can create an array with the required parameters and then map through it to create links and avoid code repetition

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@masteryada378 masteryada378 requested a review from etojeDenys July 6, 2026 12:49

@etojeDenys etojeDenys left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants