Skip to content

Conversation

@Renata11111-afk
Copy link

Copy link

@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 solution is functionally correct and meets almost all the requirements. Great job on handling the conditional rendering for the age and partner status! However, one change is required to align with the project's coding standards. In src/components/Person/Person.jsx, the ternary operator for partnerStatus must be formatted across multiple lines to improve readability, as stated in our style guide [CHECKLIST ITEM #2]. Please format it like this:

const variable = condition
  ? 'value when true'
  : 'value when false';

Once you've made this quick fix, your work will be ready to go. Keep up the great effort!


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

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

export const Person = ({ person }) => {
const { name, age, sex, isMarried, partnerName } = person;

const partnerStatus = sex === 'f' ? 'husband' : 'wife';

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'. Please format this ternary operator across multiple lines to improve readability.

@Renata11111-afk
Copy link
Author

@mateacademy-ai-mentor I tried to change that, but when im doing commit, ESLint changes the syntax back

Copy link

@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

Excellent work! I'm happy to approve your solution. You've successfully addressed all the previous feedback, and the code is now clean, readable, and meets all functional and style requirements.

I see you mentioned having some trouble with the code formatter. That can be frustrating, but the final result is perfect—the ternary operators are formatted exactly as needed. For future reference, if you run into a similar issue, you can sometimes add a // prettier-ignore comment above a code block to prevent the formatter from changing it.

Great job getting this sorted out!


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

Footnotes

  1. Rate AI review example

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