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

practical task 3 #1521

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

Conversation

Andrii-Monko
Copy link

No description provided.

Copy link

@loralevitska loralevitska left a comment

Choose a reason for hiding this comment

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

Provide demo_link to description for review

@@ -1 +1,35 @@
// export const Person = ({ person }) => ();

export const Person = ({ person }) => (

Choose a reason for hiding this comment

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

Destructure person

Comment on lines 8 to 13
{person.hasOwnProperty('age')
? (
<p className="Person__age">
{`I am ${person.age}`}
</p>
) : null}

Choose a reason for hiding this comment

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

Suggested change
{person.hasOwnProperty('age')
? (
<p className="Person__age">
{`I am ${person.age}`}
</p>
) : null}
{person.age && (
<p className="Person__age">
{`I am ${person.age}`}
</p>
)}

Comment on lines 15 to 32
{person.isMarried === false
? (
<p className="Person__partner">
I am not married
</p>
) : null}

{ person.hasOwnProperty('partnerName') && person.sex === 'f' && (
<p className="Person__partner">
{`${person.partnerName} is my husband`}
</p>
)}

{ person.hasOwnProperty('partnerName') && person.sex === 'm' && (
<p className="Person__partner">
{`${person.partnerName} is my wife`}
</p>
)}

Choose a reason for hiding this comment

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

Marriage text move to variable and combine tags into 1. It should be looks like this

Suggested change
{person.isMarried === false
? (
<p className="Person__partner">
I am not married
</p>
) : null}
{ person.hasOwnProperty('partnerName') && person.sex === 'f' && (
<p className="Person__partner">
{`${person.partnerName} is my husband`}
</p>
)}
{ person.hasOwnProperty('partnerName') && person.sex === 'm' && (
<p className="Person__partner">
{`${person.partnerName} is my wife`}
</p>
)}
<p className="Person__partner">
{person.isMarried
? `${person.partnerName} is my ${yourAwesomeVariableName}`
: 'I am not married'}
</p>
)}

@@ -1 +1,24 @@
// export const Person = ({ person }) => ();

export const Person = ({ person }) => {
Copy link

Choose a reason for hiding this comment

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

image
still not fixed

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