-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
react_person #1635
base: master
Are you sure you want to change the base?
react_person #1635
Conversation
src/components/Person/Person.jsx
Outdated
{isMarried | ||
? `${partnerName} is my ${sex === FEMALE | ||
? HUSBAND | ||
: WIFE}` | ||
: NOT_MARRIED_STATUS_MESSAGE} |
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.
Avoid using nested conditions
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.
Create variable for ${sex === FEMALE ? 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.
Thanks for your comment
Fixed👌
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.
Well done 👍
partnerName, | ||
} = person; | ||
|
||
const TYPE_OF_PARTNER = `${sex === FEMALE ? 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.
const TYPE_OF_PARTNER = `${sex === FEMALE ? HUSBAND : WIFE}`; | |
const partnerType = `${sex === FEMALE ? HUSBAND : WIFE}`; |
DEMO LINK