Skip to content

add solution#3733

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

add solution#3733
bbbozhena wants to merge 1 commit into
mate-academy:masterfrom
bbbozhena:develop

Conversation

@bbbozhena
Copy link
Copy Markdown

file:///Users/bbbozhena/react_person/reports/report.html
DEMO LINK

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 successfully meets all functional requirements. The Person component correctly handles destructuring, conditional age rendering, and gender-based partner labels, and all tests pass without issues. There is one minor code style violation in src/components/Person/Person.jsx on line 3: the ternary operator for partnerLabel is on a single line instead of having each operand on a separate line as specified in [CHECKLIST ITEM #2]. The current format: jsx const partnerLabel = sex === 'm' ? 'wife' : 'husband'; Should be formatted across multiple lines for better readability. Since this is a linting/style issue and not a functional blocker, your submission is approved. You can fix this formatting issue before your next commit using your project's linter or by manually restructuring the ternary expression.


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

Footnotes

  1. Rate AI review example

// export const Person = ({ person }) => ();
export const Person = ({ person }) => {
const { name, age, sex, isMarried, partnerName } = person;
const partnerLabel = 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 ternary should be formatted across multiple lines like the good example shows.

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