Skip to content

Task solution#2020

Open
Dominik-Dudek-code wants to merge 2 commits into
mate-academy:masterfrom
Dominik-Dudek-code:develop
Open

Task solution#2020
Dominik-Dudek-code wants to merge 2 commits into
mate-academy:masterfrom
Dominik-Dudek-code:develop

Conversation

@Dominik-Dudek-code

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.


Thank you for your hard work on this pull request! 😊 While you've made great progress, there are a few critical issues that need to be addressed before we can approve it:

  1. Import Path Typos: There are multiple instances where the import path for Comment is incorrect (Comment. instead of Comment.ts). This is crucial as it can lead to import errors and break the functionality.

  2. Null Handling: In the UserInfo.tsx file, ensure that you handle cases where the user prop might be null. This will prevent potential runtime errors and improve the robustness of your code.

  3. Function Naming: Consider renaming getUser to getUserById and getComments to getCommentsByPostId to make the purpose of these functions clearer and align with best practices.

Once these issues are resolved, your code will be in great shape! Keep up the good work, and don't hesitate to reach out if you need any help. 🚀

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

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

Comment thread src/App.tsx Outdated
Comment thread src/App.tsx
Comment thread src/App.tsx
Comment thread src/components/CommentInfo/CommentInfo.tsx Outdated
Comment thread src/components/CommentList/CommentList.tsx Outdated
Comment thread src/components/UserInfo/UserInfo.tsx
Comment thread src/types/Post.ts Outdated

@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 your project! 🎉 Your code is mostly well-structured and meets the task requirements. Here are some key points and suggestions for improvement:

  1. Function Naming: Consider renaming the functions getUser and getComments to getUserById and getCommentsByPostId, respectively. This will make their purposes clearer and align with best practices for function naming.

  2. Null Handling: Ensure that the UserInfo component can handle cases where the user prop might be null. You've already used optional chaining, which is a great approach to prevent runtime errors.

  3. Code Structure and Styling: Your components and styles are well-implemented, with clear and consistent use of types and BEM methodology. This makes your code easy to read and maintain.

Overall, your code is in good shape, and the decision to approve this pull request is to help you move forward with your learning. Please review the comments and address the issues in future iterations to enhance your code quality further. Keep up the great work and continue learning from these experiences! 🚀

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

Comment thread src/App.tsx
Comment thread src/App.tsx
Comment thread src/components/PostInfo/PostInfo.tsx

@danon321 danon321 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.

Super robota!

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.

3 participants