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

Develop #1191

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

Develop #1191

wants to merge 4 commits into from

Conversation

momos1703
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 your code is generally well-structured and meets many of the task requirements, there are a few critical issues that need to be addressed before we can approve it:

  1. Typo in Import Paths: There is a recurring typo in the import paths where servises should be corrected to services. This is crucial to ensure that the imports work correctly and the application functions as expected.

  2. Error Handling: Throwing errors inside .catch blocks without further handling can lead to unhandled promise rejections. It's important to handle these errors gracefully, such as by logging them or displaying a user-friendly message to the user.

  3. Conditional Class Application: The use of 'is-danger': false in the classNames function will never apply the 'is-danger' class. This should be based on actual error conditions, such as hasErrorMessage.nameError, to ensure the UI reflects the correct state.

Please address these issues to enhance the functionality and reliability of your code. Once these changes are made, we can proceed with the approval. Keep up the great work, and don't hesitate to reach out if you need any assistance! 😊

✨ 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 Outdated Show resolved Hide resolved
src/App.tsx Outdated Show resolved Hide resolved
src/App.tsx Outdated Show resolved Hide resolved
src/components/NewCommentForm.tsx Show resolved Hide resolved
src/components/PostDetails.tsx Outdated Show resolved Hide resolved
src/components/PostDetails.tsx Outdated Show resolved Hide resolved
src/components/PostDetails.tsx Outdated Show resolved Hide resolved
src/servises/post.tsx Outdated Show resolved Hide resolved
src/servises/user.tsx 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.


Your Pull Request has been reviewed and is approved! 🎉

Great job on implementing the core functionalities and meeting the task requirements. Here are some key points and suggestions for improvement:

  1. PropTypes: Make sure to include propTypes for your components to enable type-checking and ensure that the components receive the correct props.

  2. Error Handling: Consider using try {..} catch blocks for error handling instead of .catch() to improve readability and consistency. Also, provide more descriptive error messages to help users understand what went wrong.

  3. Unused Comments: Remove any commented-out lines in the code to keep it clean and maintainable.

  4. Key Generation: Avoid generating keys directly in the render method to prevent potential issues with dynamic data changes.

  5. State Management: Ensure that you are using state management functions like setCommentData to update state objects instead of modifying them directly.

  6. Validation Logic: Update the logic for the 'is-danger' class to accurately reflect the error state for form fields.

  7. File Relevance: The cypress/support/component-index.html file is not necessary for the current implementation and can be removed.

These improvements will enhance the functionality and maintainability of your code. Keep up the great work, and continue to learn from these experiences. Addressing these issues will help you avoid similar problems in the future. Happy coding! 🚀

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

src/App.tsx Outdated Show resolved Hide resolved
src/App.tsx Outdated Show resolved Hide resolved
src/App.tsx Show resolved Hide resolved
src/components/NewCommentForm.tsx Outdated Show resolved Hide resolved
src/components/NewCommentForm.tsx Outdated Show resolved Hide resolved
src/components/PostDetails.tsx Outdated Show resolved Hide resolved
src/components/PostDetails.tsx Outdated Show resolved Hide resolved
src/components/PostDetails.tsx Outdated Show resolved Hide resolved
src/components/PostDetails.tsx Show resolved Hide resolved
src/components/PostsList.tsx Show resolved Hide resolved
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