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

people table completed #1695

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

Conversation

MaksymMohyla
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 React application! 🎉 Your code meets all the core requirements and functions as expected. While there are a few minor issues, such as a typo in the word "response" and some redundancy in the routing setup, they don't impact the overall functionality. Keep up the good work, and consider addressing these minor points to further enhance your code quality in the future! 😊

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

src/index.tsx Outdated
Comment on lines 24 to 26
<Route path="people" element={<PeoplePage />}>
<Route index element={<PeoplePage />} />
<Route path=":personId" element={<PeoplePage />} />

Choose a reason for hiding this comment

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

The nested Route for PeoplePage with index and :personId paths seems redundant, as both render the same PeoplePage component. Consider differentiating the components or paths if they are intended to display different content.

const { personId } = useParams();
const selectedPersonId = personId;

function getPeopleWithParents(peopleResponce: Person[]) {

Choose a reason for hiding this comment

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

There is a typo in the function name getPeopleWithParents. It should be getPeopleWithParents instead of getPeopleWithParents.

useEffect(() => {
setIsPeopleLoading(true);
getPeople()
.then(responce => setPeople(getPeopleWithParents(responce)))

Choose a reason for hiding this comment

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

There is a typo in the word responce. It should be response.

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.

2 participants