Skip to content

added solution all tests passed - #3860

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

added solution all tests passed#3860
vlad4uikov wants to merge 1 commit into
mate-academy:masterfrom
vlad4uikov:develop

Conversation

@vlad4uikov

Copy link
Copy Markdown

No description provided.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

Your implementation is approved. The functional requirements are met - the Person component correctly handles all cases (married/unmarried persons, correct partner labels, age display when present). The App.jsx properly uses the component 3 times with full person objects as props. While there is a code style observation about extracting the partner label logic into a separate variable (checklist item #3), this is a minor style preference that doesn't affect functionality. Students typically address such style issues based on linter feedback, and since all tests pass and the code works correctly, there's no blocker here. Keep up the good work on getting the implementation right!


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

Footnotes

  1. Rate AI review example

Comment on lines +5 to +7
<p className="Person__partner">
{person.isMarried
? `${person.partnerName} is my ${person.sex === 'm' ? 'wife' : 'husband'}`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This violates checklist item #3: 'Avoid putting several cases to conditional rendering. Create separate variable for the condition.' The ternary that determines 'wife' or 'husband' is nested inside the conditional rendering. Create a separate variable like partnerLabel before the JSX to hold this logic.

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