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

Solution #2780

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

Solution #2780

wants to merge 2 commits into from

Conversation

tkachuk2291
Copy link

@tkachuk2291
Copy link
Author

image тесты прошли не понятно почему гит их не прял так же линт

Copy link

@anastasiiavorobiova anastasiiavorobiova left a comment

Choose a reason for hiding this comment

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

Great work! Almost done!

<h2 className="Person__name">My name is {person.name}</h2>
{person.age && <p className="Person__age">I am {person.age}</p>}
<p className="Person__partner">
{person.isMarried === true ? person.partnerName : 'I am not married'} is

Choose a reason for hiding this comment

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

Suggested change
{person.isMarried === true ? person.partnerName : 'I am not married'} is
{person.isMarried ? person.partnerName : 'I am not married'} is

{person.age && <p className="Person__age">I am {person.age}</p>}
<p className="Person__partner">
{person.isMarried === true ? person.partnerName : 'I am not married'} is
my {person.sex === 'f' ? 'husband' : 'wife'}

Choose a reason for hiding this comment

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

Suggested change
my {person.sex === 'f' ? 'husband' : 'wife'}
my {person.sex === FEMALE ? 'husband' : 'wife'}

It's better to use constants

<h2 className="Person__name">My name is {person.name}</h2>
{person.age && <p className="Person__age">I am {person.age}</p>}
<p className="Person__partner">
{person.isMarried === true ? person.partnerName : 'I am not married'} is

Choose a reason for hiding this comment

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

Also, try to make a variable with needed text to improve readability

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.

2 participants