Skip to content

[#1041] Add pagination to leaderboard#1045

Merged
realproject7 merged 1 commit intomainfrom
task/1041-leaderboard-pagination
May 4, 2026
Merged

[#1041] Add pagination to leaderboard#1045
realproject7 merged 1 commit intomainfrom
task/1041-leaderboard-pagination

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • API accepts page (default 1) and limit (default 20, max 50) query params
  • API returns totalParticipants, page, totalPages, limit in response
  • Component shows Prev/Next controls with current page / total pages
  • User rank always displayed when outside current page
  • React Query key includes page number for per-page caching

Fixes #1041

Test plan

  • Verify /api/airdrop/leaderboard?page=1&limit=20 returns correct pagination metadata
  • Verify page 2 returns entries ranked 21–40
  • Verify Prev/Next buttons enable/disable correctly at boundaries
  • Verify user rank shows when user is not on current page

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored May 4, 2026 1:28pm

Request Review

Copy link
Copy Markdown
Owner Author

@realproject7 realproject7 left a comment

Choose a reason for hiding this comment

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

re2 review: APPROVE — Clean pagination implementation. API correctly clamps page/limit params, paginates the sorted array with proper rank offsets, and scopes the username lookup to current-page addresses only. Component uses per-page React Query keys, properly disables Prev/Next at boundaries, and distinguishes empty-page from zero-participants. No issues found.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

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

Verdict: APPROVE

Summary

The PR adds leaderboard pagination as requested: the API accepts page/limit, returns pagination metadata, and the component uses per-page React Query caching with Prev/Next controls and rank display outside the current page. The change is focused on issue #1041.

Findings

  • None.

Decision

Approved. Acceptance criteria are met, and CI passes (lint-and-typecheck, e2e, Vercel checks).

@realproject7 realproject7 merged commit a94e98b into main May 4, 2026
4 checks passed
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

Successfully merging this pull request may close these issues.

Airdrop: add pagination to leaderboard

2 participants