-
Notifications
You must be signed in to change notification settings - Fork 3.3k
added solution #3540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
added solution #3540
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this 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
src/components/Person/Person.jsx
Outdated
| export const Person = ({ person }) => { | ||
| const { name, age, sex, isMarried, partnerName } = person; | ||
|
|
||
| const partnerStatus = sex === 'f' ? 'husband' : 'wife'; |
There was a problem hiding this comment.
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.
|
@mateacademy-ai-mentor I tried to change that, but when im doing commit, ESLint changes the syntax back |
mateacademy-ai-mentor
left a comment
There was a problem hiding this 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! ✨
DEMO LINK