final1#3783
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am approving your solution because all functional requirements are correctly implemented: Person is used three times in App with the full person object passed as person, marital status and partner wording (wife/husband vs. I am not married) work correctly, and age is omitted when missing. You also handled props destructuring properly and kept the conditional rendering logic simple and readable.
There is a minor style point to note: in src/App.jsx (and previously in Person.jsx), the inline ternary like sex === 'm' ? 'wife' : 'husband' goes against the formatting suggested in the checklist [CHECKLIST ITEM #2], which prefers each part of the ternary on its own line for readability. This is not a blocker for this review, but you should still adjust it in future work (or now, if you update the code) to follow the project’s style guidelines:
const partnerStatus = sex === 'm'
? 'wife'
: 'husband';Overall, your implementation is correct, consistent with the requirements, and only needs this small formatting tweak to fully align with the checklist. Good job on meeting the task’s behavior and structure expectations.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| import React from 'react'; | ||
| import './App.scss'; | ||
| import { Person } from './components/Person/Person'; | ||
|
|
There was a problem hiding this comment.
This violates checklist item #2: "Readabily is everything. Format ternary operator operands correctly - move each operand to the separate line". The sex === 'm' ? 'wife' : 'husband' expression should be split over multiple lines like in the good example from the checklist.
No description provided.