Skip to content

Create Person component#3763

Open
eg3844540-svg wants to merge 2 commits into
mate-academy:masterfrom
eg3844540-svg:master
Open

Create Person component#3763
eg3844540-svg wants to merge 2 commits into
mate-academy:masterfrom
eg3844540-svg:master

Conversation

@eg3844540-svg
Copy link
Copy Markdown

Copy link
Copy Markdown

@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

Changes are needed - your implementation meets all functional requirements, but there are two explicit checklist violations that must be fixed: 1. In Person.jsx, the person object is destructured from props, but its individual properties (name, age, sex, isMarried, partnerName) are not. Update your destructuring to ({ person: { name, age, sex, isMarried, partnerName } }) and replace all person.name, person.age, etc. with the direct variable names. 2. The ternary operator for isMarried needs each operand on its own separate line for readability. Format it like: javascript {isMarried ? `I am married with ${partnerName}` : 'I am not married'}


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

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/components/Person/Person.jsx Outdated
@@ -1 +1,11 @@
// export const Person = ({ person }) => ();
export const Person = ({ person }) => (
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This violates checklist item #1: Use destructuring for getting access to values of props object. While person is destructured from props, its properties (name, age, sex, isMarried, partnerName) are not destructured. Consider destructuring them: ({ person: { name, age, sex, isMarried, partnerName } }) and then use the values directly instead of person.name, person.age, etc.

Copy link
Copy Markdown

@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

Your implementation is approved and meets all requirements. The Person component correctly uses nested destructuring to extract name, age, sex, isMarried, and partnerName from the passed person object. The ternary operator is properly formatted with operands on separate lines, and the component handles all functional requirements including conditional age rendering, gender-aware partner terminology (wife for men, husband for women), and the "I am not married" message for unmarried persons. All three checklist items from the previous review have been successfully addressed. Great work!


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

Footnotes

  1. Rate AI review example

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.

3 participants