Skip to content

fix(leaderboard): fix tabs filtering and refetching dynamic scopes#407

Open
yush-1018 wants to merge 1 commit into
Coder-s-OG-s:mainfrom
yush-1018:fix/leaderboard-tabs
Open

fix(leaderboard): fix tabs filtering and refetching dynamic scopes#407
yush-1018 wants to merge 1 commit into
Coder-s-OG-s:mainfrom
yush-1018:fix/leaderboard-tabs

Conversation

@yush-1018

@yush-1018 yush-1018 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Changes:

  • Client Routing: Migrated tabs in LeaderboardContent to be router-driven via Next.js useRouter and useSearchParams.
  • Backend Scopes: Added 'monthly' scope (calculating XP earned in the last 30 days) and 'friends' scope (fetching followed developers on GitHub) to getLeaderboard.
  • Organization Tab Mapping: Mapped the 'organization' tab to the 'cohort' scope, dynamically fetching the user's active/latest cohort from the database if not specified.
  • Empty States: Added descriptive empty state cards for when a user isn't enrolled in a cohort or has no followed friends registered on the platform.

Fixes #389

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

@yush-1018 is attempting to deploy a commit to the codersogs-3057's projects Team on Vercel.

A member of the Team first needs to authorize it.

@jakharmonika364 jakharmonika364 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Solid feature, but the friends-tab GitHub fetch (following list) is duplicated between entries and currentUserRank, and the second one skips the cache entirely, so every Friends tab load hits GitHub's API live no matter what. Can you dedupe that into one call? Also a couple anys crept into page.tsx that weren't there before.

@jakharmonika364 jakharmonika364 added the Needs author reply Author need to reply label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs author reply Author need to reply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Leaderboard tabs don't actually refetch or filter anything

2 participants