-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
base: master
Are you sure you want to change the base?
Develop #913
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/components/NewCommentForm.tsx
Outdated
const isEmptyField = commentText.length === 0 | ||
|| commentEmail.length === 0 | ||
|| commentName.length === 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const isEmptyField = commentText.length === 0 | |
|| commentEmail.length === 0 | |
|| commentName.length === 0; | |
const isEmptyField = !commentText.length | |
|| !commentEmail.length | |
|| !commentName.length |
src/components/PostDetails.tsx
Outdated
setPostsComments(prew => prew.filter(CurentComment => ( | ||
id !== CurentComment.id | ||
))); |
There was a problem hiding this comment.
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
setPostsComments(prew => prew.filter(CurentComment => ( | |
id !== CurentComment.id | |
))); | |
setPostsComments(prew => prew.filter(curentComment => ( | |
id !== curentComment.id | |
))); |
src/components/UserSelector.tsx
Outdated
if (isDropDownActive === false) { | ||
setIsDropDownActive(true); | ||
} else { | ||
setIsDropDownActive(false); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (isDropDownActive === false) { | |
setIsDropDownActive(true); | |
} else { | |
setIsDropDownActive(false); | |
} | |
setIsDropDownActive(!setIsDropDownActive); |
There was a problem hiding this 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)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onSubmit={(event) => addComment(event)} | |
onSubmit={addComment} |
https://ivanvaverchak.github.io/react_dynamic-list-of-posts/