Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #1039

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Develop #1039

wants to merge 4 commits into from

Conversation

BoGoBooM
Copy link

@BoGoBooM BoGoBooM commented Aug 13, 2024

DEMO LINK

Sorry, I accidentally made a pull request to the wrong branch, for some reason my pull request was made to the "develop" branch. I closed the wrong pull request

@BoGoBooM BoGoBooM closed this Aug 13, 2024
@BoGoBooM BoGoBooM reopened this Aug 14, 2024
@BoGoBooM BoGoBooM changed the base branch from develop to master August 14, 2024 14:38
Copy link

@etojeDenys etojeDenys left a comment

Choose a reason for hiding this comment

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

your demo link doesn't work, try to fix that and then re-request the review

@BoGoBooM BoGoBooM requested a review from etojeDenys August 15, 2024 13:55
Copy link

@SanyaBratashchuk SanyaBratashchuk left a comment

Choose a reason for hiding this comment

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

handle plural it should be 1 item but 2 items
image

src/App.tsx Outdated
const { todos, inputValue, filterStatus } = useContext(StateContext);
const dispatch = useContext(DispatchContext);

const inputElement = useRef<HTMLInputElement>(null);

Choose a reason for hiding this comment

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

Suggested change
const inputElement = useRef<HTMLInputElement>(null);
const inputElementRef = useRef<HTMLInputElement>(null);

src/App.tsx Outdated
Comment on lines 16 to 29
const filteredTodos = todos.filter(todo => {
const { completed } = todo;

switch (filterStatus) {
case Filter.Active:
return !completed;

case Filter.Completed:
return completed;

default:
return todo;
}
});

Choose a reason for hiding this comment

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

move filter inside switch case not vice versa. To avoid redundant iteration in default case

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