added solution all tests passed - #3860
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation is approved. The functional requirements are met - the Person component correctly handles all cases (married/unmarried persons, correct partner labels, age display when present). The App.jsx properly uses the component 3 times with full person objects as props. While there is a code style observation about extracting the partner label logic into a separate variable (checklist item #3), this is a minor style preference that doesn't affect functionality. Students typically address such style issues based on linter feedback, and since all tests pass and the code works correctly, there's no blocker here. Keep up the good work on getting the implementation right!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| <p className="Person__partner"> | ||
| {person.isMarried | ||
| ? `${person.partnerName} is my ${person.sex === 'm' ? 'wife' : 'husband'}` |
There was a problem hiding this comment.
This violates checklist item #3: 'Avoid putting several cases to conditional rendering. Create separate variable for the condition.' The ternary that determines 'wife' or 'husband' is nested inside the conditional rendering. Create a separate variable like partnerLabel before the JSX to hold this logic.
No description provided.