Skip to content

add task solution - #1331

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

add task solution#1331
vitamartsekhovska wants to merge 2 commits into
mate-academy:masterfrom
vitamartsekhovska:develop

Conversation

@vitamartsekhovska

Copy link
Copy Markdown

@2pasha 2pasha 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.

good job! 👏

take a look on comments below ⬇️

Comment thread src/components/Footer.tsx Outdated
Comment on lines +24 to +53
<a
href="#/"
className={cn('filter__link', { selected: filter === 'all' })}
data-cy="FilterLinkAll"
onClick={() => onFilterChange('all')}
>
All
</a>

<a
href="#/active"
className={cn('filter__link', {
selected: filter === 'active',
})}
data-cy="FilterLinkActive"
onClick={() => onFilterChange('active')}
>
Active
</a>

<a
href="#/completed"
className={cn('filter__link', {
selected: filter === 'completed',
})}
data-cy="FilterLinkCompleted"
onClick={() => onFilterChange('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 may add all your filter values to kind of array and map through it to avoid code duplication

Comment thread src/components/Footer.tsx Outdated
Comment on lines +60 to +63
onClick={() => {
clearCompleted();
focusInput();
}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

move to separate fn

Comment thread src/components/TodoItem.tsx Outdated
Comment on lines +67 to +70
onChange={() => {
toggleTodo(todo.id);
focusInput();
}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

move to separate fn

Comment thread src/components/TodoItem.tsx Outdated
Comment on lines +76 to +79
onSubmit={event => {
event.preventDefault();
handleSave();
}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

move to separate fn

Comment thread src/components/TodoItem.tsx Outdated
Comment on lines +107 to +110
onClick={() => {
deleteTodo(todo.id);
focusInput();
}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

move to separate fn

@vitamartsekhovska
vitamartsekhovska requested a review from 2pasha July 30, 2026 14:53

@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.

3 participants