add task solution#3797
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: the Person component renders the expected data, handles the married/not married logic, and conditionally shows age only when it exists. The use of person as a single prop, correct partner wording based on sex, and proper class names all align with the task specification. The inline age !== undefined && <p ...> conditional is simple, clear, and does not introduce any functional or checklist-breaking issues, so it does not rise to the level of a critical blocker.
One reviewer comment suggested changing the formatting of that conditional for readability, but this is a stylistic preference rather than a functional or explicit checklist violation, so it should not block your progress. If you want to align more with that style suggestion, you could rewrite it over multiple lines, for example:
{age !== undefined
&& (
<p className="Person__age">I am {age}</p>
)
}Overall, your work meets the task’s requirements solidly, and any remaining style discussions can be handled via automated tooling or future refactoring. Nicely done.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| <section className="Person"> | ||
| <h2 className="Person__name">My name is {name}</h2> | ||
|
|
||
| {age !== undefined && <p className="Person__age">I am {age}</p>} |
There was a problem hiding this comment.
This violates checklist item #2: "Format ternary operator operands correctly - move each operand to the separate line". Your conditional rendering uses an inline && expression ({age !== undefined && <p ...>}), which follows the same single-line pattern as the BAD EXAMPLE ternary. Refactor this conditional so each operand (condition and rendered JSX) is on separate lines for better readability as required.
DEMO LINK