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

final #2725

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

final #2725

wants to merge 2 commits into from

Conversation

ykrapivka
Copy link

No description provided.

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 implementation is almost there! 🎉 However, the error handling in the getAll function needs improvement to meet the task requirements. Providing more informative error messages or handling specific error cases will enhance the user experience. Once you address this, your code will be in great shape! Keep up the good work! 😊

✨ 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/api/goods.ts Outdated
Comment on lines 7 to 12
return fetch(API_URL).then(response => {
if (response.ok) {
return response.json();
}

throw new Error();

Choose a reason for hiding this comment

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

The error handling in the getAll function is very basic. According to the checklist, you should handle possible errors when making a request to the server. Consider providing a more informative error message or handling specific error cases to improve the user experience.

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.

Sorry, the pull request review was unsuccessful for the following reasons:

Warning

No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: 7]

If the issue is within your control, please address it.
The next review attempt will automatically launch in 1 hour.
If you believe this is an error or need assistance, please contact the support team.

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.

Great job on implementing the App component and related functions! 🎉 Your code meets the task requirements and constraints, and you've successfully addressed previous feedback regarding error handling in the getAll function. Here are some key points from the review:

  • Error Handling: You've improved the getAll function by adding proper error handling, which is crucial for robust applications. Well done!

  • GoodsList Component: This component is implemented correctly, using best practices like styling each item with the color of the Good object and using the id as a key.

  • Functions in goods.ts: These are implemented correctly, with get5First and getRedGoods effectively utilizing getAll to process data.

While your code is solid, always ensure that functions and components handle errors appropriately and optimize rendering when necessary. Although there are no critical issues, remember to review comments to refine your skills further. Keep up the great work, and continue learning from each task! 🚀

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

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