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

Task solution #2020

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

Conversation

Dominik-Dudek-code
Copy link

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.


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.

src/App.tsx Outdated Show resolved Hide resolved
src/App.tsx Show resolved Hide resolved
src/App.tsx Show resolved Hide resolved
src/components/CommentInfo/CommentInfo.tsx Outdated Show resolved Hide resolved
src/components/CommentList/CommentList.tsx Outdated Show resolved Hide resolved
src/components/UserInfo/UserInfo.tsx Show resolved Hide resolved
src/types/Post.ts Outdated Show resolved Hide resolved
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 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! ✨

src/App.tsx Show resolved Hide resolved
src/App.tsx Show resolved Hide resolved
src/components/PostInfo/PostInfo.tsx Show resolved Hide resolved
Copy link

@danon321 danon321 left a comment

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