-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Solution #1131
base: master
Are you sure you want to change the base?
Solution #1131
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.
Almost done, let's improve your code a bit more!
src/components/People/People.tsx
Outdated
<ErrorNotification dataCy="peopleLoadingError" errorMessage={error} /> | ||
); | ||
|
||
case isPeopleEmpthy: |
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.
isPeopleEmpthy => isPeopleEmpty
src/utils/getSortedPeople.ts
Outdated
? b.name.toLowerCase().localeCompare(a.name.toLowerCase()) | ||
: a.name.toLowerCase().localeCompare(b.name.toLowerCase()); |
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.
DRY, It looks like we can move this fragment into a separate helper functionb.name.toLowerCase().localeCompare(a.name.toLowerCase())
src/utils/searchHelper.ts
Outdated
// console.log({ currentParams, paramsToUpdate }); | ||
|
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.
remove redundant comment please
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.
Looks good to me🔥
DEMO LINK