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

done task #2698

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

done task #2698

wants to merge 1 commit into from

Conversation

Jion353
Copy link

@Jion353 Jion353 commented Nov 19, 2024

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Great job on implementing the Person component! 🎉 The code meets all the task requirements and handles conditional rendering effectively. While the component is well-structured, consider adding default values or handling undefined properties to make it even more robust. Keep up the excellent work! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

@@ -1,5 +1,6 @@
import React from 'react';
import './App.scss';
import { Person } from './components/Person/Person';

Choose a reason for hiding this comment

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

Ensure that the Person component is implemented to handle cases where certain properties might be missing, such as age in the olya and alex objects. Consider providing default values or handling undefined values within the Person component.

Copy link

@BudnikOleksii BudnikOleksii left a comment

Choose a reason for hiding this comment

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

Good work 👍
Approved, but left a comments and don't forget to add a demo link so a reviewer can test your solution

Comment on lines +4 to +6
{person.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.age ? (
<p className="Person__age"> {`I am ${person.age}`} </p>
) : null}
{person.age && (
<p className="Person__age"> {`I am ${person.age}`} </p>
)}

You don't need to use ternary operator if you return nothing in the second case

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