From 0ee50c23fc05b34acd78c8a5bbd444282a6796d8 Mon Sep 17 00:00:00 2001 From: Shiv Bhonde Date: Wed, 14 Feb 2024 12:42:23 +0530 Subject: [PATCH] add basic example to show connected address --- packages/nextjs/app/page.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/nextjs/app/page.tsx b/packages/nextjs/app/page.tsx index 035b3314c..2a84037f9 100644 --- a/packages/nextjs/app/page.tsx +++ b/packages/nextjs/app/page.tsx @@ -1,16 +1,26 @@ +"use client"; + import Link from "next/link"; import type { NextPage } from "next"; +import { useAccount } from "wagmi"; import { BugAntIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline"; +import { Address } from "~~/components/scaffold-eth"; const Home: NextPage = () => { + const { address: connectedAddress } = useAccount(); + return ( <>
-

+

Welcome to Scaffold-ETH 2

+
+

Connected Address:

+
+

Get started by editing{" "}