-
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
solution #1022
base: master
Are you sure you want to change the base?
solution #1022
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.
Almost good! Please check your DEMO link, it's link to api partly(but it's not place where you should change it and it's not link to send to review)
README.md
Outdated
@@ -10,7 +10,7 @@ form to add new comments. | |||
1. Initially the `App` shows the `UserSelector` and a paragraph `No user selected` in the main content block. | |||
- load users from the API on page load; | |||
- implement the `UserSelector` as a dropdown using the given markup; | |||
1. When a user is selected load the user's posts form [the API](https://mate-academy.github.io/fe-students-api/) and show them using a table in the main content clock; | |||
1. When a user is selected load the user's posts form [the API](https://oleksiy-uchaev.github.io/fe-students-api/) and show them using a table in the main content clock; |
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.
you shouldn't change this link, it's mate-academy api
{ 'is-active': comments.length === 0 }, | ||
{ | ||
'is-hidden': comments.length !== 0 | ||
|| loadType === Load.Comments, | ||
})} |
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.
{ 'is-active': comments.length === 0 }, | |
{ | |
'is-hidden': comments.length !== 0 | |
|| loadType === Load.Comments, | |
})} | |
{ 'is-active': !comments.length }, | |
{ | |
'is-hidden': comments.length | |
|| loadType === Load.Comments, | |
})} |
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.
Good job 👍
Let's improve your code
href={`mailto:${comment.email}`} | ||
data-cy="CommentAuthor" | ||
> | ||
{comment.name} |
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.
Use the destruction for comment
|
||
return ( | ||
<> | ||
{comments.length > 0 && <p className="title is-4">Comments:</p>} |
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.
{comments.length > 0 && <p className="title is-4">Comments:</p>} | |
{!!comments.length && <p className="title is-4">Comments:</p>} |
<button | ||
type="reset" | ||
className="button is-link is-light" | ||
onClick={() => handleClearForm()} |
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.
onClick={() => handleClearForm()} | |
onClick={handleClearForm} |
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.
Well done.
DEMO LINK