-
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
solutionPerson #1860
base: master
Are you sure you want to change the base?
solutionPerson #1860
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.
Good start, let's make some improvements
src/components/Person/Person.jsx
Outdated
`${partnerName} is my wife` | ||
)} | ||
|
||
{isMarried && sex === 'f' && ( | ||
`${partnerName} is my husband` |
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.
Looks too complicated, create a separate variable for person partnet
const partnet = person.sex === 'm' ? 'wife' : 'husband'
And use this variable in your template
src/components/Person/Person.jsx
Outdated
<h2 className="Person__name"> | ||
{`My name is ${name}`} | ||
</h2> |
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.
You can put in into one line
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.
Good job!
No description provided.