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

solve #1736

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

solve #1736

wants to merge 1 commit into from

Conversation

Daniil-102
Copy link

Copy link

@Mariagosp Mariagosp 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!

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 task requirements! 🎉 While there are a few minor issues, such as the use of person.name as a key and potential confusion with nested routes, these do not critically impact the functionality. Consider addressing these in future iterations for improved code quality. Keep up the good work! 😊

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

Comment on lines +14 to +17
<Route path="people">
<Route index element={<People />} />
<Route path=":peopleId" element={<People />} />
</Route>

Choose a reason for hiding this comment

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

The nested routes under /people might cause confusion. The People component is used for both the index route and the :peopleId route. Ensure that the People component can handle both cases appropriately, or consider using different components if they serve different purposes.

Comment on lines +16 to +17
<tr
key={person.name}

Choose a reason for hiding this comment

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

Using person.name as a key might not be unique if there are multiple people with the same name. Consider using a unique identifier, such as person.slug or another unique property, to ensure that each element has a unique key.

Comment on lines +19 to +20
father: peopleFromServer.find(p => p.name === person.fatherName),
mother: peopleFromServer.find(p => p.name === person.motherName),

Choose a reason for hiding this comment

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

The logic for finding a person's father and mother by name may lead to incorrect associations if there are multiple people with the same name. Consider using a unique identifier for each person to ensure accurate parent-child relationships.


<tbody>
{people.map(person => (
<PersonLink key={person.name} person={person} />

Choose a reason for hiding this comment

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

Using person.name as a key might not be unique if there are multiple people with the same name. Consider using a unique identifier, such as person.slug or another unique property, to ensure that each element has a unique key.

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