Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great work on this task! Your solution is approved as it correctly implements all the required functionality. The Person component handles all conditions perfectly, and the App component is set up just right.
I'm leaving one small suggestion for future tasks regarding code style. In src/components/Person/Person.jsx, the nested ternary operator for determining the partner's title could be formatted across multiple lines to improve readability, as mentioned in our style guide [CHECKLIST ITEM #2]. This is a minor point that doesn't affect functionality but is a good practice to follow.
Overall, this is an excellent submission. Keep up the great work!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| person: { name, age, sex, isMarried, partnerName }, | ||
| }) => { | ||
| const partnerText = isMarried | ||
| ? `${partnerName} is my ${sex === 'm' ? 'wife' : 'husband'}` |
There was a problem hiding this comment.
This nested ternary operator sex === 'm' ? 'wife' : 'husband' should also be formatted according to the code style guide. As per checklist item #2, each part of the operator should be on a new line to improve readability.
https://o-koszalka.github.io/react_person/