Skip to content

add task solution#3791

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

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

Conversation

@krlosa

@krlosa krlosa commented Jul 3, 2026

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

I am approving your solution because all functional requirements are correctly implemented: Person renders the right markup, is used three times in App with the full person object, and the married/not‑married and age behaviors are all correct. The only issue noted is a code‑style concern in src/components/Person/Person.jsx, where the inner ternary person.sex === 'm' ? 'wife' : 'husband' is written on a single line instead of having each operand on its own line as required by [CHECKLIST ITEM #2]. This is a readability/style violation rather than a functional blocker, so it does not prevent task completion or break any behavior. To improve the code, reformat that nested ternary so the condition, the ? branch, and the : branch are each on separate lines following the “GOOD EXAMPLE” pattern from your checklist. Aside from that, your use of props destructuring, conditional rendering for age, and handling of the married status are all clear and correct. Nice work overall on meeting the task’s requirements and keeping the component logic straightforward.


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

Footnotes

  1. Rate AI review example

{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.

This violates checklist item #2: Format ternary operator operands correctly - move each operand to the separate line. The inner ternary person.sex === 'm' ? 'wife' : 'husband' is written in the single-line BAD EXAMPLE form and should be reformatted so each operand is on its own line.

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