File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 33import Link from "next/link" ;
44import type { NextPage } from "next" ;
55import { BugAntIcon , MagnifyingGlassIcon } from "@heroicons/react/24/outline" ;
6+ import { useScaffoldReadContract } from "~~/hooks/scaffold-eth" ;
67
78const Home : NextPage = ( ) => {
9+ const { data : checkedInCount , isLoading } = useScaffoldReadContract ( {
10+ contractName : "BatchRegistry" ,
11+ functionName : "checkedInCounter" ,
12+ } ) ;
13+
814 return (
915 < >
1016 < div className = "flex items-center flex-col grow pt-10" >
@@ -16,7 +22,11 @@ const Home: NextPage = () => {
1622 < p className = "text-center text-lg" > Get started by taking a look at your batch GitHub repository.</ p >
1723 < p className = "text-lg flex gap-2 justify-center" >
1824 < span className = "font-bold" > Checked in builders count:</ span >
19- < span > To Be Implemented</ span >
25+ { isLoading ? (
26+ < span className = "loading loading-spinner loading-sm" > </ span >
27+ ) : (
28+ < span > { checkedInCount ?. toString ( ) } </ span >
29+ ) }
2030 </ p >
2131 </ div >
2232
You can’t perform that action at this time.
0 commit comments