Skip to content

add task solution#3797

Open
mariiaherasymiukdev-bit wants to merge 1 commit into
mate-academy:masterfrom
mariiaherasymiukdev-bit:master
Open

add task solution#3797
mariiaherasymiukdev-bit wants to merge 1 commit into
mate-academy:masterfrom
mariiaherasymiukdev-bit:master

Conversation

@mariiaherasymiukdev-bit

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: the Person component renders the expected data, handles the married/not married logic, and conditionally shows age only when it exists. The use of person as a single prop, correct partner wording based on sex, and proper class names all align with the task specification. The inline age !== undefined && <p ...> conditional is simple, clear, and does not introduce any functional or checklist-breaking issues, so it does not rise to the level of a critical blocker.

One reviewer comment suggested changing the formatting of that conditional for readability, but this is a stylistic preference rather than a functional or explicit checklist violation, so it should not block your progress. If you want to align more with that style suggestion, you could rewrite it over multiple lines, for example:

{age !== undefined
  && (
    <p className="Person__age">I am {age}</p>
  )
}

Overall, your work meets the task’s requirements solidly, and any remaining style discussions can be handled via automated tooling or future refactoring. Nicely done.


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

Footnotes

  1. Rate AI review example

<section className="Person">
<h2 className="Person__name">My name is {name}</h2>

{age !== undefined && <p className="Person__age">I am {age}</p>}

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". Your conditional rendering uses an inline && expression ({age !== undefined && <p ...>}), which follows the same single-line pattern as the BAD EXAMPLE ternary. Refactor this conditional so each operand (condition and rendered JSX) is on separate lines for better readability as required.

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