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

todo app #674

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

todo app #674

wants to merge 2 commits into from

Conversation

Orchibald
Copy link

Copy link

@VitaliyBodnar VitaliyBodnar left a comment

Choose a reason for hiding this comment

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

  • all tests are not passed
Screenshot 2023-09-07 at 14 25 09

Comment on lines 30 to 37
if (value) {
updateTodoTitle();
setIsEditable(false);
} else {
deleteTodo();
setIsEditable(false);
}
};

Choose a reason for hiding this comment

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

Suggested change
if (value) {
updateTodoTitle();
setIsEditable(false);
} else {
deleteTodo();
setIsEditable(false);
}
};
value ? updateTodoTitle() : deleteTodo();
setIsEditable(false);
};

Comment on lines 42 to 48
if (e.key === 'Enter') {
handleEdit(e.target.value);
}

if (e.key === 'Escape') {
setIsEditable(false);
}

Choose a reason for hiding this comment

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

it's better to use switch case statement here

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.

good job

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