-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
base: master
Are you sure you want to change the base?
Task solution #2020
Conversation
Dominik-Dudek-code
commented
Jan 19, 2025
- DEMO LINK
There was a problem hiding this 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:
-
Import Path Typos: There are multiple instances where the import path for
Comment
is incorrect (Comment.
instead ofComment.ts
). This is crucial as it can lead to import errors and break the functionality. -
Null Handling: In the
UserInfo.tsx
file, ensure that you handle cases where theuser
prop might be null. This will prevent potential runtime errors and improve the robustness of your code. -
Function Naming: Consider renaming
getUser
togetUserById
andgetComments
togetCommentsByPostId
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.
There was a problem hiding this 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:
-
Function Naming: Consider renaming the functions
getUser
andgetComments
togetUserById
andgetCommentsByPostId
, respectively. This will make their purposes clearer and align with best practices for function naming. -
Null Handling: Ensure that the
UserInfo
component can handle cases where theuser
prop might benull
. You've already used optional chaining, which is a great approach to prevent runtime errors. -
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! ✨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super robota!