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

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

Develop #1355

wants to merge 2 commits into from

Conversation

MarushchakM
Copy link

No description provided.

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.


Great job on implementing the code! 🎉 The structure and functionality are mostly spot on, with well-organized components and appropriate use of props. There is a minor issue with the getCommentById function name, which could be misleading. Renaming it to getCommentsByPostId would enhance clarity. Also, consider moving styles from App.scss to component-specific files for better organization. Keep up the good work! 😊

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

Comment on lines +12 to +15
function getCommentById(postId) {
return (
commentsFromServer.filter(comment => comment.postId === postId) || null
);

Choose a reason for hiding this comment

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

The function getCommentById is named in a way that suggests it returns a single comment by its ID, but it actually returns an array of comments filtered by postId. Consider renaming the function to something like getCommentsByPostId to better reflect its purpose and improve code readability.

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