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

Done #2666

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

Done #2666

wants to merge 2 commits into from

Conversation

IrynaMariiko00
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 task! 😊 Your implementation is almost perfect, but there's a small logical error in the Person.jsx component regarding the determination of the partner's role. The logic should be updated to correctly assign 'wife' to females and 'husband' to males using the condition: const partner = person.sex === 'f' ? 'wife' : 'husband';. Once this is corrected, your code will meet all 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/components/Person/Person.jsx 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 implementing the App.jsx and Person.jsx components! 🎉 Your code is well-structured, and the use of destructuring for props is a nice touch. The Person component is correctly used within the App component to render the person objects.

However, there is a logical error in the Person.jsx component regarding the determination of the partner's role. The current logic assigns 'wife' to males and 'husband' to females, which is incorrect. It should be updated to person.sex === 'f' ? 'husband' : 'wife'; to ensure the roles are assigned correctly.

Despite this issue, the decision is to APPROVE the pull request to help you move forward with your learning. Please review the comments and make the necessary corrections to improve your code. Addressing these issues will be crucial for the functionality of your application and will help you avoid similar problems in the future. Keep up the good work and continue learning from these experiences! 🚀

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

@@ -1 +1,15 @@
// export const Person = ({ person }) => ();
export const Person = ({ person }) => {
const partner = person.sex === 'm' ? 'wife' : 'husband';

Choose a reason for hiding this comment

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

There's a logical error here. The condition should be person.sex === 'f' ? 'husband' : 'wife'; to correctly assign 'wife' to females and 'husband' to males.

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