From a469fb2ef44a423f797ba24fc769f045bc95b7ba Mon Sep 17 00:00:00 2001 From: Asante-ntiro Date: Tue, 10 Dec 2024 19:16:06 +0300 Subject: [PATCH 1/2] added checked-in builders counter --- packages/nextjs/app/page.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/nextjs/app/page.tsx b/packages/nextjs/app/page.tsx index a0a413f..22c4010 100644 --- a/packages/nextjs/app/page.tsx +++ b/packages/nextjs/app/page.tsx @@ -3,8 +3,14 @@ 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 } = useScaffoldReadContract({ + contractName: "BatchRegistry", + functionName: "checkedInCounter", + watch: true, + }); return ( <>
@@ -16,7 +22,7 @@ const Home: NextPage = () => {

Get started by taking a look at your batch GitHub repository.

Checked in builders count: - To Be Implemented + {checkedInCounter?.toString()}

From 6fe1932fbdbc94d7089a2c7c428a541fc4322889 Mon Sep 17 00:00:00 2001 From: phipsae Date: Thu, 12 Dec 2024 07:45:31 +0100 Subject: [PATCH 2/2] Update page.tsx update order to comply with nextjs lint --- packages/nextjs/app/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nextjs/app/page.tsx b/packages/nextjs/app/page.tsx index 6b7ccd5..f84a9f1 100644 --- a/packages/nextjs/app/page.tsx +++ b/packages/nextjs/app/page.tsx @@ -3,8 +3,8 @@ import Link from "next/link"; import type { NextPage } from "next"; import { BugAntIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline"; -import { useScaffoldReadContract } from "~~/hooks/scaffold-eth"; import BuildersGrid from "~~/components/batch/BuildersGrid"; +import { useScaffoldReadContract } from "~~/hooks/scaffold-eth"; const Home: NextPage = () => { const { data: checkedInCounter } = useScaffoldReadContract({