Skip to content

add task solution#3749

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

add task solution#3749
chlodav wants to merge 1 commit into
mate-academy:masterfrom
chlodav:develop

Conversation

@chlodav
Copy link
Copy Markdown

@chlodav chlodav commented May 22, 2026

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 is correct and meets all functional requirements. The code properly handles destructuring, optional age fields, gendered partner labels, and marital status messaging. All specified requirements from the task are working as expected. However, there are two code style issues that need attention per the checklist: the ternary operator on line 7 should have its operands on separate lines for better readability [CHECKLIST ITEM #2], and the partner label logic (person.sex === 'm' ? 'wife' : 'husband') should be extracted to a separate variable before the return statement [CHECKLIST ITEM #3]. These are formatting and readability improvements rather than functional issues—your code will work correctly regardless. Since the core functionality is implemented properly and these are stylistic checklist violations, I'm approving the submission. Keep up the good work on the implementation!


✨ 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 +6 to +7
{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.

According to checklist item #2, format ternary operator operands correctly - move each operand to the separate line. The ternary on line 7 should have condition, true value, and false value on separate lines.

{person.age && <p className="Person__age">I am {person.age}</p>}
<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.

According to checklist item #3, avoid putting several cases to conditional rendering. Create a separate variable for the partner label logic (person.sex === 'm' ? 'wife' : 'husband') to improve readability.

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