Skip to content

add task solution#2030

Open
katarzynamilewska wants to merge 1 commit into
mate-academy:masterfrom
katarzynamilewska:develop
Open

add task solution#2030
katarzynamilewska wants to merge 1 commit into
mate-academy:masterfrom
katarzynamilewska:develop

Conversation

@katarzynamilewska

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! 🎉 Your code meets all the core requirements and functions as expected. While the use of the non-null assertion operator (!) when assigning the user could be improved for robustness, it does not break any core requirements for this task. Just keep in mind for future projects that handling potential undefined values more safely can help prevent runtime errors. Keep up the good work!


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

Footnotes

  1. Rate AI review example

Comment thread src/App.tsx

const preparedPosts: Post[] = postsFromServer.map(post => ({
...post,
user: usersFromServer.find(user => user.id === post.userId)!,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Issue: The use of the non-null assertion operator (!) after 'usersFromServer.find(...)' assumes that a user will always be found for every post. If a user is missing, this will cause a runtime error. Please ensure that this is allowed by the task requirements or handle the case where a user might not be found, as required by the checklist.

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