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

Test solution #1201

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

Test solution #1201

wants to merge 2 commits into from

Conversation

IDWIL8
Copy link

@IDWIL8 IDWIL8 commented Dec 10, 2024

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.

Thank you for your hard work on this! 😊 However, there are a few critical issues that need to be addressed before we can approve the pull request. The main issue is the mismatch between the props expected by the Tabs component and those provided by the App component. Specifically, the Tabs component expects an onTabSelected prop, but the App component is passing an onClick prop. Additionally, the Tabs component should render tabs within a <ul> element and handle the active tab content properly. Please make these changes to ensure the functionality aligns with the task requirements. Keep up the great work, and feel free 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.jsx Outdated
Comment on lines 28 to 32
onClick={(newTitle, newContent, newActiveTabId) => {
setTitle(newTitle);
setContent(newContent);
setActiveTabId(newActiveTabId);
}}

Choose a reason for hiding this comment

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

The Tabs component expects an onTabSelected prop, but here you are passing an onClick prop. You should rename onClick to onTabSelected to match the expected prop name in the Tabs component.

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 addressing the previous issues with the App.jsx and Tabs.jsx components! 🎉 Your implementation now correctly aligns with the task requirements:

  • Props Handling: The Tabs component now correctly receives the onTabSelected prop, ensuring proper tab selection functionality.
  • Component Logic: The logic for determining the active tab and handling click events is sound, with the active tab's content displayed correctly.
  • State Management: The App component effectively manages the state of the active tab ID using the useState hook.

Your code meets the task requirements and constraints, and the issues from the previous review have been addressed. While the decision is to APPROVE this pull request to help you move forward with your learning, please review the comments to further improve your code. Remember, addressing any critical issues in future projects will help you avoid similar problems and enhance your coding skills. Keep up the great work and continue learning from each experience! 🚀

✨ 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