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

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

Develop #1163

wants to merge 6 commits into from

Conversation

Anya-Laban
Copy link

DEMO LINK

Не проходить 2 тести, але якщо дивитись в браузері DevTools, то все працює коректно ніби
image
image

Copy link

@volodymyr-soltys97 volodymyr-soltys97 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 👍
Let's improve your code
The comment cannot be only spaces
image

Add a correct type to input of email
image

Copy link

@volodymyr-soltys97 volodymyr-soltys97 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!
To improve:

  1. The author name cannot be only spaces
image

src/App.tsx Outdated
</div>
)}

{!hasError && userPosts.length > 0 && (

Choose a reason for hiding this comment

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

Suggested change
{!hasError && userPosts.length > 0 && (
{!hasError && !!userPosts.length && (

Comment on lines 110 to 133
<article
key={comment.id}
className="message is-small"
data-cy="Comment"
>
<div className="message-header">
<a href={`mailto:${comment.email}`} data-cy="CommentAuthor">
{comment.name}
</a>
<button
data-cy="CommentDelete"
type="button"
className={classNames('button delete is-small', {
'is-loading': deletingCommentId === comment.id,
})}
aria-label="delete"
onClick={() => handleDeleteComment(comment.id)}
></button>
</div>

<div className="message-body" data-cy="CommentBody">
{comment.body}
</div>
</article>

Choose a reason for hiding this comment

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

Move this logic to the CommentInfo component

</div>

<div className="message-body" data-cy="CommentBody">
{comment.body}

Choose a reason for hiding this comment

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

Use destructuring for comment

data-cy="PostButton"
className={classNames('button is-link', {
'is-light': selectedPost?.id !== post.id,
})} // //Close (not is-light)

Choose a reason for hiding this comment

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

Suggested change
})} // //Close (not is-light)
})}

href={`#user-${user.id}`}
className={classNames('dropdown-item', {
'is-active': selectedUser && selectedUser.id === user.id,
})} //is-active

Choose a reason for hiding this comment

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

Suggested change
})} //is-active
})}

Copy link

@GUSILLUS GUSILLUS left a comment

Choose a reason for hiding this comment

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

GJ!

eveniet quo quis laborum totam consequatur non dolor ut et est
repudiandae est voluptatem vel debitis et magnam
</p>
<p data-cy="PostBody">{post.body}</p>

Choose a reason for hiding this comment

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

Consider using destruction assignment to post object

data-cy="WriteCommentButton"
type="button"
className="button is-link"
onClick={() => setIsFormActive(true)}

Choose a reason for hiding this comment

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

Consider adding handler function

</thead>

<tbody>
{posts.map(post => (

Choose a reason for hiding this comment

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

Same wuith destruction assignment

</a>
{users.map(user => (
<a
key={user.id}

Choose a reason for hiding this comment

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

Same

@Anya-Laban
Copy link
Author

Не впевнена що я правильно зрозуміла, що потрібно було виправити

@Anya-Laban Anya-Laban requested a review from GUSILLUS September 16, 2024 12:20
Copy link

@anastasiiavorobiova anastasiiavorobiova left a comment

Choose a reason for hiding this comment

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

Great work!

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.

4 participants