feat: implement premium leaderboard component and data layer (Closes #259)#300
feat: implement premium leaderboard component and data layer (Closes #259)#300AdityaM-IITH wants to merge 3 commits into
Conversation
|
@AdityaM-IITH is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Thanks for your first PR on DevTrack! 🎉
A maintainer will review it within 48 hours. While you wait:
- Make sure CI is passing (type-check + lint)
- Double-check the PR description is filled out and the issue is linked
- Feel free to ask questions in Discussions if you need help
a7a2243 to
23efeca
Compare
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Two TypeScript errors blocking CI:
src/app/api/goals/route.ts(47,30): error TS7006: Parameter 'goal' implicitly has an 'any' type.src/app/api/user/github-accounts/route.ts(39,37): error TS7006: Parameter 'account' implicitly has an 'any' type.
Add explicit types to both parameters. For context:
- The
goalparam is being mapped/filtered — add theGoaltype that's already defined in that file - The
accountparam in github-accounts route — type it as theLinkedAccountinterface
Fix these type errors and CI will pass.
|
The leaderboard UI concept is good, but this PR has significant issues: 1. Mock data — 2. New dependency — 3. Supabase anon client — the component calls 4. leaderboard/page.tsx conflict — PR #336 also adds a leaderboard page that's going through review. Please implement the real API integration (there's already an |
32b9ab0 to
029fe8a
Compare
|
The leaderboard feature was already merged via PR #336. This PR conflicts with Before resubmitting:
Closing this PR. If there are improvements to the existing leaderboard, please open a new focused PR. |
Summary
This pull request introduces the Public Leaderboard Page component, designed with a premium, high-performance bento grid layout to showcase top contributors. The rankings are dynamically calculated based on active contribution streaks and total commit counts.
Closes #259
Type of Change
Changes Made
src/components/LeaderboardPage.tsxusing glassmorphism styling, a dedicated top-3 developer podium, and subtle ambient gradients.[ Rank 2 ] [ Rank 1 ] [ Rank 3 ]with visual elevation and distinct scaling for the MVP.useLeaderboardto query the contributors table, order results by active streaks and total commits, and handle loading, error, and empty database states gracefully.supabaseclient insrc/lib/supabase.tsutilizing the public anon key for secure browser operations.lucide-reactto support premium, highly visible graphical icons across the leaderboard views.How to Test
Steps for the reviewer to verify this works:
npm run devwith.envunconfigured or empty. Navigate to/leaderboardand verify that the page gracefully falls back to displaying a beautiful, fully-populated mock contributor board showing both the asymmetrical podium and the index list.NEXT_PUBLIC_SUPABASE_URLandNEXT_PUBLIC_SUPABASE_ANON_KEYvariables to your environment. The page will instantly transition to query real-time data from your Supabase backend.npm run type-check) or styling warnings (npm run lint).Screenshots (if UI change)
Asymmetric Desktop Podium Layout
Displays Rank 2, Rank 1 (elevated), and Rank 3 card spatial ordering:

Checklist
npm run lintpasses locallynpm run type-check)