Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

refactor: update Accounts components to use new contract hooks and add pagination #2669

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

jnsdls
Copy link
Member

@jnsdls jnsdls commented Jun 14, 2024

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.



PR-Codex overview

This PR focuses on optimizing the Accounts UI by integrating new contract functions and improving pagination.

Detailed summary

  • Updated Accounts UI components to use new contract functions
  • Implemented pagination for better user experience
  • Removed unused dependencies and improved code readability

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Jun 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 14, 2024 11:45pm

Copy link

graphite-app bot commented Jun 14, 2024

Your org requires the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Member Author

jnsdls commented Jun 14, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @jnsdls and the rest of your teammates on Graphite Graphite

@jnsdls jnsdls marked this pull request as ready for review June 14, 2024 23:14
@jnsdls jnsdls requested a review from MananTank as a code owner June 14, 2024 23:14
Copy link

graphite-app bot commented Jun 14, 2024

Merge activity

…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.

---
@jnsdls jnsdls force-pushed the feat/refactor-accounts-components branch from aa13b0a to 9ae2f58 Compare June 14, 2024 23:34
@graphite-app graphite-app bot merged commit 9ae2f58 into main Jun 14, 2024
11 checks passed
@graphite-app graphite-app bot deleted the feat/refactor-accounts-components branch June 14, 2024 23:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants