File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { BugAntIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline";
66import { useScaffoldReadContract } from "~~/hooks/scaffold-eth" ;
77
88const Home : NextPage = ( ) => {
9- const { data : checkedInCount } = useScaffoldReadContract ( {
9+ const { data : checkedInCount , isLoading } = useScaffoldReadContract ( {
1010 contractName : "BatchRegistry" ,
1111 functionName : "checkedInCounter" ,
1212 } ) ;
@@ -22,7 +22,11 @@ const Home: NextPage = () => {
2222 < p className = "text-center text-lg" > Get started by taking a look at your batch GitHub repository.</ p >
2323 < p className = "text-lg flex gap-2 justify-center" >
2424 < span className = "font-bold" > Checked in builders count:</ span >
25- < span > { checkedInCount ?. toString ( ) || "0" } </ span >
25+ { isLoading ? (
26+ < span className = "loading loading-spinner loading-sm" > </ span >
27+ ) : (
28+ < span > { checkedInCount ?. toString ( ) } </ span >
29+ ) }
2630 </ p >
2731 </ div >
2832
You can’t perform that action at this time.
0 commit comments