Skip to content

solution#3657

Open
leemonch1k-space wants to merge 1 commit intomate-academy:masterfrom
leemonch1k-space:develop
Open

solution#3657
leemonch1k-space wants to merge 1 commit intomate-academy:masterfrom
leemonch1k-space:develop

Conversation

@leemonch1k-space
Copy link
Copy Markdown

No description provided.

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

Great work on this task! I'm happy to approve your solution as it meets all the functional requirements. The Person component is implemented correctly, and you've handled all the conditional logic for displaying age and marital status perfectly.

I have one small suggestion for future improvement regarding code style. In src/components/Person/Person.jsx, the nested ternary operator is a bit hard to read on a single line. For better readability, it's a good practice to format ternaries with each operand on a new line, as mentioned in our checklist [CHECKLIST ITEM #2].

This is just a minor style point, and your logic is spot on. Excellent job!


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

Footnotes

  1. Rate AI review example

{age != null && <p className="Person__age">{`I am ${age}`}</p>}
<p className="Person__partner">
{isMarried
? `${partnerName} is my ${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 nested ternary operator is not formatted correctly. According to checklist item #2, each operand of a ternary operator should be on a new line.

For better readability, you could either format this nested ternary or extract the logic for determining the partner's title ('wife' or 'husband') into a variable before the return statement.

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