|
1 | 1 | "use client"; |
2 | 2 |
|
3 | | -import Link from "next/link"; |
4 | | -import { Address } from "@scaffold-ui/components"; |
5 | 3 | import type { NextPage } from "next"; |
6 | | -import { hardhat } from "viem/chains"; |
7 | | -import { useAccount } from "wagmi"; |
8 | | -import { BugAntIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline"; |
9 | | -import { useTargetNetwork } from "~~/hooks/scaffold-eth"; |
| 4 | +import { BackgammonBoard } from "~~/components/BackgammonBoard"; |
10 | 5 |
|
11 | 6 | const Home: NextPage = () => { |
12 | | - const { address: connectedAddress } = useAccount(); |
13 | | - const { targetNetwork } = useTargetNetwork(); |
14 | | - |
15 | 7 | return ( |
16 | 8 | <> |
17 | 9 | <div className="flex items-center flex-col grow pt-10"> |
18 | | - <div className="px-5"> |
19 | | - <h1 className="text-center"> |
20 | | - <span className="block text-2xl mb-2">Welcome to</span> |
21 | | - <span className="block text-4xl font-bold">Scaffold-ETH 2</span> |
22 | | - </h1> |
23 | | - <div className="flex justify-center items-center space-x-2 flex-col"> |
24 | | - <p className="my-2 font-medium">Connected Address:</p> |
25 | | - <Address |
26 | | - address={connectedAddress} |
27 | | - chain={targetNetwork} |
28 | | - blockExplorerAddressLink={ |
29 | | - targetNetwork.id === hardhat.id ? `/blockexplorer/address/${connectedAddress}` : undefined |
30 | | - } |
31 | | - /> |
32 | | - </div> |
33 | | - |
34 | | - <p className="text-center text-lg"> |
35 | | - Get started by editing{" "} |
36 | | - <code className="italic bg-base-300 text-base font-bold max-w-full break-words break-all inline-block"> |
37 | | - packages/nextjs/app/page.tsx |
38 | | - </code> |
39 | | - </p> |
40 | | - <p className="text-center text-lg"> |
41 | | - Edit your smart contract{" "} |
42 | | - <code className="italic bg-base-300 text-base font-bold max-w-full break-words break-all inline-block"> |
43 | | - YourContract.sol |
44 | | - </code>{" "} |
45 | | - in{" "} |
46 | | - <code className="italic bg-base-300 text-base font-bold max-w-full break-words break-all inline-block"> |
47 | | - packages/hardhat/contracts |
48 | | - </code> |
49 | | - </p> |
50 | | - </div> |
51 | | - |
52 | | - <div className="grow bg-base-300 w-full mt-16 px-8 py-12"> |
53 | | - <div className="flex justify-center items-center gap-12 flex-col md:flex-row"> |
54 | | - <div className="flex flex-col bg-base-100 px-10 py-10 text-center items-center max-w-xs rounded-3xl"> |
55 | | - <BugAntIcon className="h-8 w-8 fill-secondary" /> |
56 | | - <p> |
57 | | - Tinker with your smart contract using the{" "} |
58 | | - <Link href="/debug" passHref className="link"> |
59 | | - Debug Contracts |
60 | | - </Link>{" "} |
61 | | - tab. |
62 | | - </p> |
63 | | - </div> |
64 | | - <div className="flex flex-col bg-base-100 px-10 py-10 text-center items-center max-w-xs rounded-3xl"> |
65 | | - <MagnifyingGlassIcon className="h-8 w-8 fill-secondary" /> |
66 | | - <p> |
67 | | - Explore your local transactions with the{" "} |
68 | | - <Link href="/blockexplorer" passHref className="link"> |
69 | | - Block Explorer |
70 | | - </Link>{" "} |
71 | | - tab. |
72 | | - </p> |
73 | | - </div> |
74 | | - </div> |
| 10 | + <div className="px-5 w-auto rounded-lg"> |
| 11 | + <BackgammonBoard /> |
75 | 12 | </div> |
76 | 13 | </div> |
77 | 14 | </> |
|
0 commit comments