Skip to content

Solution#2038

Open
Kawka06 wants to merge 2 commits into
mate-academy:masterfrom
Kawka06:develop
Open

Solution#2038
Kawka06 wants to merge 2 commits into
mate-academy:masterfrom
Kawka06:develop

Conversation

@Kawka06

@Kawka06 Kawka06 commented Jan 29, 2026

Copy link
Copy Markdown

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

Great job on structuring the application and implementing the core logic! The component separation is well done. However, there are a couple of issues that need to be addressed before this can be approved.

First, in src/components/PostInfo/PostInfo.tsx, the text "Posted by" is displayed even when there is no user associated with the post. This is a minor visual bug and also violates the guideline on rendering static text [CHECKLIST ITEM #5]. To fix this, please move the "Posted by" text inside the conditional block so it only renders when post.user exists.

Additionally, the function names in src/App.tsx could be more descriptive. According to our guidelines [CHECKLIST ITEM #6], functions that find an entity by a filter should specify it in the name. Please rename getUser to getUserById and getComments to getCommentsByPostId for better clarity.

Once these changes are made, your solution will be ready for approval. Keep up the great work!


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

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/components/PostInfo/PostInfo.tsx Outdated
<h3 className="PostInfo__title">{post.title}</h3>

<p>
{' Posted by '}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This method of rendering a static string is inconsistent with the guidelines in checklist item #5. It's better to place static text directly within the JSX. To conditionally render both the text and the UserInfo component, you can group them together within the post.user check.

Comment thread src/App.tsx Outdated

<p>
{' Posted by '}
function getUser(userId: number): User | null {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This violates checklist item #6: 'If you are searching some entity by some filter, specify it in function/method name'. Since this function finds a user by their ID, a more descriptive name would be getUserById.

Comment thread src/App.tsx Outdated
</a>
</p>
</div>
function getComments(postId: number): Comment[] {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This violates checklist item #6: 'If you are searching some entity by some filter, specify it in function/method name'. This function filters comments by postId, so it should be named getCommentsByPostId for clarity.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

Excellent work on this submission! You've successfully addressed all the functional requirements and naming conventions from the previous review. The application is well-structured, the components are logically separated, and everything works as expected.

I am approving your solution.

As a final tip for even cleaner code, you can simplify how you add static text in JSX. For example, in CommentInfo.tsx, instead of <strong>...</strong>{' by '}<a...>, you can write it more directly as <strong>...</strong> by <a.... This is a minor style point that improves readability, but your current implementation is fully functional.

Great job overall!


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

Footnotes

  1. Rate AI review example

<div className="CommentInfo__title">
<strong className="CommentInfo__name">{comment.name}</strong>

{' by '}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This way of adding a static string is a bit verbose and could be simplified. According to checklist item #5, it's better to avoid using {'...'} for static text. You can write the string directly between the components, like ...</strong> by <a..., which is cleaner and improves 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