File tree Expand file tree Collapse file tree 1 file changed +8
-16
lines changed
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components Expand file tree Collapse file tree 1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change 11"use client" ;
22
3- import {
4- SimpleGrid ,
5- Skeleton ,
6- Stat ,
7- StatLabel ,
8- StatNumber ,
9- } from "@chakra-ui/react" ;
103import type { ThirdwebContract } from "thirdweb" ;
114import { totalAccounts } from "thirdweb/extensions/erc4337" ;
125import { useReadContract } from "thirdweb/react" ;
13- import { Card } from "tw- components" ;
6+ import { StatCard } from "../../overview/ components/stat-card " ;
147
158type AccountsCountProps = {
169 contract : ThirdwebContract ;
@@ -19,13 +12,12 @@ type AccountsCountProps = {
1912export const AccountsCount : React . FC < AccountsCountProps > = ( { contract } ) => {
2013 const totalAccountsQuery = useReadContract ( totalAccounts , { contract } ) ;
2114 return (
22- < SimpleGrid columns = { { base : 1 , md : 3 } } spacing = { { base : 3 , md : 6 } } >
23- < Card as = { Stat } >
24- < StatLabel mb = { { base : 1 , md : 0 } } > Total Accounts</ StatLabel >
25- < Skeleton isLoaded = { totalAccountsQuery . isSuccess } >
26- < StatNumber > { totalAccountsQuery . data ?. toString ( ) } </ StatNumber >
27- </ Skeleton >
28- </ Card >
29- </ SimpleGrid >
15+ < div className = "grid grid-cols-1 gap-3 md:grid-cols-3 md:gap-6" >
16+ < StatCard
17+ label = "Total Accounts"
18+ value = { totalAccountsQuery . data ?. toString ( ) || "0" }
19+ isPending = { totalAccountsQuery . isPending }
20+ />
21+ </ div >
3022 ) ;
3123} ;
You can’t perform that action at this time.
0 commit comments