diff --git a/packages/nextjs/app/page.tsx b/packages/nextjs/app/page.tsx index 09baef2..184c0c8 100644 --- a/packages/nextjs/app/page.tsx +++ b/packages/nextjs/app/page.tsx @@ -3,8 +3,17 @@ import Link from "next/link"; import type { NextPage } from "next"; import { BugAntIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline"; +import { useScaffoldReadContract } from "~~/hooks/scaffold-eth"; const Home: NextPage = () => { + const { data: checkedInCounter, error } = useScaffoldReadContract({ + contractName: "BatchRegistry", + functionName: "checkedInCounter", + }); + + if (error) { + console.log("Error fetching checkedInCounter", error); + } return ( <>
Get started by taking a look at your batch GitHub repository.
-- Checked in builders count: - To Be Implemented -
++ Checked in builders count: + {checkedInCounter.toString()} +
+ ) : ( ++ An error occurred, check your console for more information 👀 +
+ )} +