Skip to content

Develop#1299

Open
Vitaligna wants to merge 1 commit into
mate-academy:masterfrom
Vitaligna:develop
Open

Develop#1299
Vitaligna wants to merge 1 commit into
mate-academy:masterfrom
Vitaligna:develop

Conversation

@Vitaligna
Copy link
Copy Markdown

Copy link
Copy Markdown

@2pasha 2pasha left a comment

Choose a reason for hiding this comment

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

lgtm 🔥

take a look on comments below

Comment thread src/components/Footer.tsx
Comment on lines +53 to +57
onClick={() => {
const comletedTodos = todos.filter(todo => todo.completed === true);

dispatch({ type: 'delete', payload: comletedTodos });
}}
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/Footer.tsx
Comment on lines +17 to +46
<a
href="#/"
className={classNames('filter__link', { selected: filter === 'All' })}
data-cy="FilterLinkAll"
onClick={() => setFilter('All')}
>
All
</a>

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

<a
href="#/completed"
className={classNames('filter__link', {
selected: filter === 'Completed',
})}
data-cy="FilterLinkCompleted"
onClick={() => setFilter('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 to separate enum all filters value and map through it

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