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

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

Develop #913

wants to merge 3 commits into from

Conversation

IvanVaverchak
Copy link

@IvanVaverchak IvanVaverchak commented Sep 9, 2023

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.

  • please also check the issue with tests
Screenshot 2023-09-09 at 16 46 25

Comment on lines 28 to 30
const isEmptyField = commentText.length === 0
|| commentEmail.length === 0
|| commentName.length === 0;

Choose a reason for hiding this comment

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

Suggested change
const isEmptyField = commentText.length === 0
|| commentEmail.length === 0
|| commentName.length === 0;
const isEmptyField = !commentText.length
|| !commentEmail.length
|| !commentName.length

Comment on lines 51 to 53
setPostsComments(prew => prew.filter(CurentComment => (
id !== CurentComment.id
)));

Choose a reason for hiding this comment

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

callback parameter name can't be Capitalize

Suggested change
setPostsComments(prew => prew.filter(CurentComment => (
id !== CurentComment.id
)));
setPostsComments(prew => prew.filter(curentComment => (
id !== curentComment.id
)));

Comment on lines 24 to 28
if (isDropDownActive === false) {
setIsDropDownActive(true);
} else {
setIsDropDownActive(false);
}

Choose a reason for hiding this comment

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

Suggested change
if (isDropDownActive === false) {
setIsDropDownActive(true);
} else {
setIsDropDownActive(false);
}
setIsDropDownActive(!setIsDropDownActive);

Copy link

@lerastarynets lerastarynets left a comment

Choose a reason for hiding this comment

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

Great job overall! Left one tiny suggestion for the improvement

<form data-cy="NewCommentForm">
<form
data-cy="NewCommentForm"
onSubmit={(event) => addComment(event)}

Choose a reason for hiding this comment

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

Suggested change
onSubmit={(event) => addComment(event)}
onSubmit={addComment}

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