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

finished #1858

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

finished #1858

wants to merge 8 commits into from

Conversation

Fluebubble
Copy link

@Fluebubble Fluebubble commented Nov 16, 2023

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.

Good job, but there is quite a bit of work to be done.
Also, according to the task, the PR descriptions must include a link to the project demo:

Replace <your_account> with your Github username in the DEMO LINK and add it to the PR description.

@@ -1 +1,15 @@
// export const Person = ({ person }) => ();
export const Person = ({
person: { name, age, sex, partnerName, isMarried },

Choose a reason for hiding this comment

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

Such destructuring should be done in the middle of the component, not in the arguments

{age && <p className="Person__age">{`I am ${age}`}</p>}
<p className="Person__partner">
{isMarried
? `${partnerName} is my ${sex === 'f' ? 'husband' : 'wife'}`

Choose a reason for hiding this comment

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

Avoid using "magic values" (what is f ?)

Copy link

@ilyapgitt ilyapgitt left a comment

Choose a reason for hiding this comment

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

Hi! Can I get your link on your Demo? Roman wrote about it
кккккк

@Fluebubble Fluebubble requested a review from ilyapgitt November 20, 2023 10:28
Copy link

@polosanya polosanya left a comment

Choose a reason for hiding this comment

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

Almost done!

Comment on lines 6 to 7
<>
<section className="Person">

Choose a reason for hiding this comment

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

Suggested change
<>
<section className="Person">
<section className="Person">

React fragment is redundant here as you already have a container

Comment on lines 8 to 10
<h2 className="Person__name">{`My name is ${name}`}</h2>
{age && <p className="Person__age">{`I am ${age}`}</p>}
<p className="Person__partner">

Choose a reason for hiding this comment

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

Suggested change
<h2 className="Person__name">{`My name is ${name}`}</h2>
{age && <p className="Person__age">{`I am ${age}`}</p>}
<p className="Person__partner">
<h2 className="Person__name">{`My name is ${name}`}</h2>
{age && (
<p className="Person__age">
{`I am ${age}`}
</p>
)}
<p className="Person__partner">

Pay attention to the formatting

{age && <p className="Person__age">{`I am ${age}`}</p>}
<p className="Person__partner">
{isMarried
? `${partnerName} is my ${sex === SEX_FEMALE ? 'husband' : 'wife'}`

Choose a reason for hiding this comment

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

Let's create a variable for husband/wife to avoid nesting ternary operators
image

Suggested change
? `${partnerName} is my ${sex === SEX_FEMALE ? 'husband' : 'wife'}`
? `${partnerName} is my ${partner}`

Copy link
Author

Choose a reason for hiding this comment

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

change added 4 days ago, but I didn't sent them to check:(

@Fluebubble Fluebubble requested a review from polosanya November 24, 2023 09:57
Copy link

@ArtemTeslenko ArtemTeslenko left a comment

Choose a reason for hiding this comment

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

Good job 👍

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.

5 participants