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

First solution #1698

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

Conversation

Vasyl-Zhyliakov
Copy link

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 HashRouter, handling the 'no people' message, and the findParentLink function, they don't significantly impact the functionality. Keep up the good work and consider these improvements for future projects! 😊

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

@@ -1,166 +1,24 @@
import { Loader } from './components/Loader';

import { Routes, Route, Navigate } from 'react-router-dom';

Choose a reason for hiding this comment

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

The task description specifies using HashRouter instead of the default BrowserRouter to ensure links can be shared on GitHub pages. Consider wrapping the Routes component with HashRouter.

}
const parent = people.find(person => person.name === name);

return parent?.slug;

Choose a reason for hiding this comment

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

The findParentLink function should return null or undefined instead of parent?.slug when the parent is not found. This will prevent generating incorrect links when the parent does not exist.

Comment on lines 37 to 39
{people.length === 0 && (
<p data-cy="noPeopleMessage">There are no people on the server</p>
)}

Choose a reason for hiding this comment

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

The condition people.length === 0 for displaying the 'no people' message should also check if !loading to avoid showing this message while data is still being fetched.

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! 🎉 Your implementation meets all the task requirements and constraints effectively. The code is well-structured, and all components are functioning as expected. Keep up the excellent work, and continue to pay attention to detail as you have done here. 😊

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

Copy link

@TarasHoliuk TarasHoliuk left a comment

Choose a reason for hiding this comment

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

LGTM!

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