Skip to content

Solution#3728

Open
ValentynaBahyrly wants to merge 1 commit into
mate-academy:masterfrom
ValentynaBahyrly:develop
Open

Solution#3728
ValentynaBahyrly wants to merge 1 commit into
mate-academy:masterfrom
ValentynaBahyrly:develop

Conversation

@ValentynaBahyrly
Copy link
Copy Markdown

[x] DEMO LINK

[x] Implement a Person component rendering a person's details using the given markup
and use it 3 times inside the App instead of static markup.

[x] - Pass the entire person object as a prop using <Person person={misha} /> (do not use individual fields);
[x] - Omit the age if it is not present in the person object;
[x] - If a man is married, refer to his partner as wife; if a woman is married, refer to her partner as husband;
[x] - If a person is not married, display the message "I am not married";
[x] - Ensure that the class names in Person.jsx match those used in App.jsx (Person, Person__name, Person__age, [x] Person__partner).

[x] Important: The constants misha, olya, and alex are valid and should not be modified. Property age is optional.

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Your implementation successfully meets all task requirements. The Person component properly destructures props, uses the correct class names (Person, Person__name, Person__age, Person__partner), and renders three instances in App.jsx passing the full person object as a prop. Conditional rendering handles all cases correctly: age omission when not present, gender-specific partner terminology ("wife" for men, "husband" for women), and the "I am not married" message for unmarried persons. The ternary operator is formatted with operands on separate lines as required. All 10 checklist items pass with no critical blockers found.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants