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

Use /users endpoint for leaderboard #19

Open
gracewzhang opened this issue Mar 21, 2023 · 0 comments
Open

Use /users endpoint for leaderboard #19

gracewzhang opened this issue Mar 21, 2023 · 0 comments

Comments

@gracewzhang
Copy link
Member

Description

  • Modify the leaderboard so that it uses real user data instead of dummy data

Todo

These points are a rough guideline. Please feel free to explore what the best way to design this feature is!

  • Check out the /users endpoint in the API <-- this is what you'll be calling from the frontend to get a list of all users & their relevant stats
  • Inside the page containing the Leaderboard component, use useQuery() to call /users & retrieve the list of users
    • The nice thing abt the endpoint is that the list it returns is automatically sorted by points!
    • You can reference the check in page for an example of how to use useQuery()
  • Replace the dummy data w/the list returned by your API call

Useful links

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

No branches or pull requests

1 participant