Skip to content

done - #3856

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

done#3856
sofiatsebenko wants to merge 1 commit into
mate-academy:masterfrom
sofiatsebenko:develop

Conversation

@sofiatsebenko

Copy link
Copy Markdown

@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 meets all core functional requirements. The Person component correctly handles the person object, displays conditional age, manages married/unmarried states, and shows 'wife'/'husband' based on sex. The 3 checklist violations in Person.jsx ([CHECKLIST ITEMS #1, #2, #3]) are code style issues—accessing properties via person.property, ternary formatting, and combining conditions—rather than functional blockers. These style improvements are important for code quality, so consider destructuring the properties, formatting ternary operators across multiple lines, and extracting the partner text to a separate variable when you have a chance to refactor.


✨ 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 +1 to +3
export const Person = ({ person }) => (
<section className="Person">
<h2 className="Person__name">My name is {person.name}</h2>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Checklist Item #1 violation: While person is destructured from props, individual properties like name, age, isMarried, partnerName, and sex are accessed directly via person.property. Destructure these values from person for better code style.

Comment on lines +8 to +9
{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.

Checklist Item #2 violation: Ternary operator operands should each be on a separate line for readability. Consider reformatting the ternary on lines 8-9.

Comment on lines +8 to +9
{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.

Checklist Item #3 violation: Multiple conditions are combined in the conditional rendering (checking isMarried AND determining partner label). Create a separate variable for the partner text to improve readability and maintainability.

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