This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: update Accounts components to use new contract hooks and ad…
…d pagination (#2669) ### TL;DR Implement pagination and count querying in the accounts page. ### What changed? 1. Modified `accounts-count.tsx` to use `totalAccounts` from `thirdweb/extensions/erc4337` instead of fetching all accounts. 2. Updated `accounts-table.tsx` to incorporate pagination with the help of `totalAccounts` and `getAccounts` functions from `thirdweb/extensions/erc4337`. 3. Adjusted `page.tsx` to pass the contract to `AccountsCount` and `AccountsTable` components instead of accountsQuery. 4. Introduced pagination controls and page size selection in `accounts-table.tsx`. ### How to test? 1. Navigate to the accounts page. 2. Verify that the total number of accounts is displayed correctly. 3. Check the pagination functionality by navigating through pages and adjusting the page size. ### Why make this change? To improve the user experience on the accounts page by enabling efficient data fetching and display through pagination. ---
- Loading branch information
Showing
3 changed files
with
156 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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