-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
commit solution #517
base: master
Are you sure you want to change the base?
commit solution #517
Conversation
src/pages/PeoplePage.tsx
Outdated
export const PeoplePage = () => { | ||
const [people, setPeople] = useState<Person[]>([]); | ||
const [error, setError] = useState(false); | ||
const [loading, setLoading] = useState<boolean>(false); |
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.
you could initially set loading to true, and when you're done fetching your data - set it to false
src/pages/PeoplePage.tsx
Outdated
const [loading, setLoading] = useState<boolean>(false); | ||
|
||
useEffect(() => { | ||
setLoading(true); |
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.
please take a look at comment above ⬆️
centuries, | ||
sort, | ||
order, | ||
}: Params):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.
prettier?
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.
LGTM ✅
DEMO LINK