File tree 1 file changed +8
-16
lines changed
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components 1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change 1
1
"use client" ;
2
2
3
- import {
4
- SimpleGrid ,
5
- Skeleton ,
6
- Stat ,
7
- StatLabel ,
8
- StatNumber ,
9
- } from "@chakra-ui/react" ;
10
3
import type { ThirdwebContract } from "thirdweb" ;
11
4
import { totalAccounts } from "thirdweb/extensions/erc4337" ;
12
5
import { useReadContract } from "thirdweb/react" ;
13
- import { Card } from "tw- components" ;
6
+ import { StatCard } from "../../overview/ components/stat-card " ;
14
7
15
8
type AccountsCountProps = {
16
9
contract : ThirdwebContract ;
@@ -19,13 +12,12 @@ type AccountsCountProps = {
19
12
export const AccountsCount : React . FC < AccountsCountProps > = ( { contract } ) => {
20
13
const totalAccountsQuery = useReadContract ( totalAccounts , { contract } ) ;
21
14
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 >
30
22
) ;
31
23
} ;
You can’t perform that action at this time.
0 commit comments