Change#3732
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation correctly fulfills all core functional requirements—the Person component handles the person object, conditional age display, marriage status, and partner labels work as expected. However, there are 3 explicit checklist violations that need to be addressed:
-
[CHECKLIST ITEM #1] In
Person.jsx, you only destructure{person}from props, then access properties likeperson.name,person.age, etc. You should destructure all individual properties directly from props:export const Person = ({name, age, sex, isMarried, partnerName}) => -
[CHECKLIST ITEM #2] The ternary operator operands should each be on a separate line, not all on one line. Format the ternary so condition, true value, and false value are on distinct lines.
-
[CHECKLIST ITEM #3] The nested ternary
sex === 'm' ? 'wife' : 'husband'is embedded inside JSX without a separate variable. Create apartnerLabelconstant before using it.
The same destructuring issue applies in App.jsx—properties should be destructured individually from the person object rather than accessed via person.name, person.age, etc. Once you address these checklist items, the code will fully comply with the requirements.
✨ 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
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation is approved. The code correctly fulfills all core functional requirements, and the test failures mentioned in the check run analysis appear to be from a different context or version of the code than what's being reviewed here. The only remaining issue is a code style/formatting violation (checklist item #3) — the nested ternary sex === 'm' ? 'wife' : 'husband' should be extracted into a partnerLabel constant before the JSX block. This is a minor linting concern that you'll fix automatically when your linter/formatter runs. All other checklist items are properly addressed: destructuring from props is correct, ternary operands are on separate lines, and the functional logic works as expected. Great work on getting the core implementation right — keep building on this foundation.
✨ 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
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I'm approving your solution with an educational override. Your implementation demonstrates strong understanding of the core requirements — you correctly pass the entire person object as a prop, handle conditional age rendering, and implement the partner labeling logic based on sex. Great job on all the functional aspects! A couple of minor formatting improvements will help your code meet professional standards: ternary expressions should have each operand on its own line ([CHECKLIST ITEM #2]), so instead of const partnerLabel = sex === 'm' ? 'wife' : 'husband';, format it as: javascript const partnerLabel = sex === 'm' ? 'wife' : 'husband'; The same formatting should apply to the inline conditional in your JSX for readability. These are quick fixes that will be auto-corrected with Prettier when you apply the recommended VScode settings. Your logic and component structure are solid — keep up the excellent work!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.