Skip to content

solution #1581

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

solution #1581

wants to merge 1 commit into from

Conversation

Yuliia-Fil
Copy link

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Review Summary

Great job! 🎉 Your implementation meets all the core requirements and functions as expected. All components are well-structured, data is passed correctly via props, and each part is styled appropriately. The only minor suggestion is to remove the redundant || null in the getCommentsById function for cleaner code, but this does not impact functionality. Keep up the good work and continue to pay attention to small improvements like this in the future!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

</p>
</div>
function getCommentsById(postId) {
return commentsFromServer.filter(com => com.postId === postId) || null;

Choose a reason for hiding this comment

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

The use of || null after commentsFromServer.filter(...) is redundant, since filter always returns an array (empty if no matches). This is a minor issue and does not affect functionality, but you may want to remove the fallback for clarity.

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.

2 participants