Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

react_person #1635

wants to merge 2 commits into from

Conversation

vatatan
Copy link

@vatatan vatatan commented Aug 22, 2023

Comment on lines 28 to 32
{isMarried
? `${partnerName} is my ${sex === FEMALE
? HUSBAND
: WIFE}`
: NOT_MARRIED_STATUS_MESSAGE}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using nested conditions

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}

Copy link
Author

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👌

Copy link

@roman-mirzoian roman-mirzoian left a 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}`;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const TYPE_OF_PARTNER = `${sex === FEMALE ? HUSBAND : WIFE}`;
const partnerType = `${sex === FEMALE ? HUSBAND : WIFE}`;

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.

3 participants