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 #1085

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

Develop #1085

wants to merge 5 commits into from

Conversation

Krykunov
Copy link

@Krykunov Krykunov commented Dec 5, 2024

Copy link

@StasSokolov1 StasSokolov1 left a comment

Choose a reason for hiding this comment

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

Almost done, let's improve your code a bit more!

src/Store.tsx Outdated
let updatedTodos = state.allTodos;

switch (action.type) {
case 'addTodo': {

Choose a reason for hiding this comment

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

let's move addTodo and other cases to enum and reuse


const handleFormSubmit = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();
if (todoTitle.trim() === '') {

Choose a reason for hiding this comment

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

Suggested change
if (todoTitle.trim() === '') {
if (!!todoTitle.trim()) {


return (
<header className="todoapp__header">
{/* this button should have `active` class only if all todos are completed */}

Choose a reason for hiding this comment

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

please remove comment

Comment on lines 1 to 2
/* eslint-disable jsx-a11y/label-has-associated-control */
/* eslint-disable jsx-a11y/control-has-associated-label */

Choose a reason for hiding this comment

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

can we remove this?

@Krykunov Krykunov requested a review from StasSokolov1 December 9, 2024 15:15
Copy link

@StasSokolov1 StasSokolov1 left a comment

Choose a reason for hiding this comment

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

Looks like a masterpiece!

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