Skip to content

add task solution #1587

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 2 commits into
base: master
Choose a base branch
from
Open

add task solution #1587

wants to merge 2 commits into from

Conversation

gtailde
Copy link

@gtailde gtailde commented May 22, 2025

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 works as expected. The only issue found is a minor naming inconsistency: the function getPostsById actually retrieves comments for a post, so renaming it to something like getCommentsByPostId would make your code clearer and easier to maintain. This doesn't affect functionality, so your PR is approved. Keep up the good work and consider improving naming conventions in future projects!


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

Footnotes

  1. Rate AI review example

src/App.jsx Outdated
Comment on lines 12 to 14
function getPostsById(postId) {
return commentsFromServer.filter(comment => comment.postId === postId);
}

Choose a reason for hiding this comment

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

Issue: The function getPostsById is misleadingly named. It actually retrieves comments for a given post, not posts by ID. Consider renaming it to something like getCommentsByPostId to better reflect its purpose and avoid confusion.

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