add solution#3733
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation successfully meets all functional requirements. The Person component correctly handles destructuring, conditional age rendering, and gender-based partner labels, and all tests pass without issues. There is one minor code style violation in src/components/Person/Person.jsx on line 3: the ternary operator for partnerLabel is on a single line instead of having each operand on a separate line as specified in [CHECKLIST ITEM #2]. The current format: jsx const partnerLabel = sex === 'm' ? 'wife' : 'husband'; Should be formatted across multiple lines for better readability. Since this is a linting/style issue and not a functional blocker, your submission is approved. You can fix this formatting issue before your next commit using your project's linter or by manually restructuring the ternary expression.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| // export const Person = ({ person }) => (); | ||
| export const Person = ({ person }) => { | ||
| const { name, age, sex, isMarried, partnerName } = person; | ||
| const partnerLabel = sex === 'm' ? 'wife' : 'husband'; |
There was a problem hiding this comment.
This violates checklist item #2: Format ternary operator operands correctly - move each operand to the separate line. The ternary should be formatted across multiple lines like the good example shows.
file:///Users/bbbozhena/react_person/reports/report.html
DEMO LINK