-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
solved #2782
base: master
Are you sure you want to change the base?
solved #2782
Conversation
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.
Thank you for your hard work on this pull request! 😊 There are a few critical issues that need to be addressed before we can approve it:
-
Syntax Error in Ternary Expression: The ternary expression used to determine the partner's relationship status is incorrectly placed inside a template literal. This results in a syntax error. Please adjust the expression to
${person.sex === 'f' ? 'husband' : 'wife'}
to ensure it evaluates correctly. -
Import Path Verification: Ensure that the import path for the
Person
component is correct. Double-check that thePerson
component exists in the specified directory./components/Person/Person
. An incorrect path will lead to a module not found error, impacting the functionality.
Once these issues are resolved, your code will be much closer to meeting the task requirements. Keep up the great work, and don't hesitate to reach out if you need any help! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
@@ -1,5 +1,6 @@ | |||
import React from 'react'; | |||
import './App.scss'; | |||
import { Person } from './components/Person/Person'; |
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.
Ensure that the import path for the Person
component is correct. Verify that the Person
component exists in the specified directory ./components/Person/Person
. If the path is incorrect, it will result in a module not found error.
src/components/Person/Person.jsx
Outdated
{person.isMarried | ||
? `${person.partnerName} is my ${person.sex} === 'f' ? 'husband' : 'wife'` | ||
: 'I am not married'} |
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.
There is a syntax error in the ternary expression used to determine the partner's relationship status. The expression ${person.sex} === 'f' ? 'husband' : 'wife'
is inside a template literal but should be evaluated separately. Consider using parentheses to correctly evaluate the ternary expression: ${person.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.
Great job on implementing the App.jsx
and Person.jsx
components! 🎉 Your code meets the task requirements, and the components are well-structured. The Person
component correctly uses conditional rendering, and the import paths are verified and correct.
You've successfully addressed previous issues, such as the syntax error in the ternary expression and the import path verification. Keep up the good work!
Remember to always review any comments for potential improvements, especially in future projects. This will help you refine your skills and avoid similar issues. Keep learning and coding! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
DEMO LINK