feat: implement pagination for token dashboard (#29)#145
Merged
Ejirowebfi merged 1 commit intoMar 24, 2026
Conversation
- Add useTokens hook with page/pageSize (default 10) parameters - Slice tokens client-side from full list for accurate totals - Add PaginationControls component with Previous/Next buttons - Show 'Showing X–Y of Z tokens' range indicator - Disable Prev/Next at first/last page boundaries - Export PaginationControls from UI index - Refactor Dashboard to use useTokens hook
|
@unixfundz Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #29
The dashboard previously fetched and rendered all tokens at once, which causes slow loads for users with many deployed tokens. This PR adds page-based pagination to limit how many tokens are shown at a time.
Changes
useTokens hook — new hook that fetches all tokens for the connected wallet and slices them client-side by page and pageSize (default 10). Resets to page 1 on reload/wallet change.
PaginationControls component — reusable UI component with Previous/Next buttons, a page indicator, and a token range label.
Dashboard — refactored to use useTokens. Pagination controls are hidden when a search query is active since filtering already narrows the result set.
index.ts
— exports PaginationControls.
Acceptance Criteria
Only pageSize (10) tokens are shown per page
Previous button is disabled on page 1
Next button is disabled on the last page
Page indicator shows current page and total pages (Page X of Y)
Range label shows Showing X–Y of Z tokens
Testing
Run the frontend locally and connect a wallet that has deployed multiple tokens to verify pagination behavior.