-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
base: master
Are you sure you want to change the base?
people table completed #1695
Conversation
There was a problem hiding this 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
<Route path="people" element={<PeoplePage />}> | ||
<Route index element={<PeoplePage />} /> | ||
<Route path=":personId" element={<PeoplePage />} /> |
There was a problem hiding this comment.
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[]) { |
There was a problem hiding this comment.
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
.
src/pages/PeoplePage.tsx
Outdated
useEffect(() => { | ||
setIsPeopleLoading(true); | ||
getPeople() | ||
.then(responce => setPeople(getPeopleWithParents(responce))) |
There was a problem hiding this comment.
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
.
DEMO LINK