|
1 | 1 | "use client"; |
2 | 2 |
|
3 | | -import Link from "next/link"; |
4 | 3 | import type { NextPage } from "next"; |
5 | | -import { BugAntIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline"; |
6 | | -import { useScaffoldReadContract } from "~~/hooks/scaffold-eth"; |
| 4 | +import { ActionCards } from "~~/components/ActionCards"; |
| 5 | +import { BatchStatus } from "~~/components/BatchStatus"; |
7 | 6 |
|
8 | 7 | const Home: NextPage = () => { |
9 | | - const { data: checkedInCounter, isSuccess: isCheckedInCounterSuccess } = useScaffoldReadContract({ |
10 | | - contractName: "BatchRegistry", |
11 | | - functionName: "checkedInCounter", |
12 | | - }); |
13 | | - |
14 | 8 | return ( |
15 | | - <> |
16 | | - <div className="flex items-center flex-col grow pt-10"> |
17 | | - <div className="px-5"> |
18 | | - <h1 className="text-center"> |
19 | | - <span className="block text-2xl mb-2">Welcome to</span> |
20 | | - <span className="block text-4xl font-bold">Batch 22</span> |
21 | | - </h1> |
22 | | - <p className="text-center text-lg mt-2">Building the future of web3 together</p> |
23 | | - <p className="text-lg flex gap-2 justify-center mt-6"> |
24 | | - <span className="font-bold">Checked in builders count:</span> |
25 | | - {isCheckedInCounterSuccess ? ( |
26 | | - <span>{checkedInCounter ? checkedInCounter.toString() : 0}</span> |
27 | | - ) : ( |
28 | | - <span className="loading loading-spinner"></span> |
29 | | - )} |
30 | | - </p> |
31 | | - </div> |
| 9 | + <div className="min-h-screen bg-base-200 overflow-x-hidden"> |
| 10 | + {/* Hero */} |
| 11 | + <section |
| 12 | + className=" |
| 13 | + relative flex flex-col items-center text-center |
| 14 | + px-4 |
| 15 | + pt-8 pb-6 |
| 16 | + sm:pt-12 sm:pb-10 |
| 17 | + md:pt-20 md:pb-16 |
| 18 | + " |
| 19 | + > |
| 20 | + {/* Gradient glow */} |
| 21 | + <div |
| 22 | + className=" |
| 23 | + pointer-events-none absolute inset-x-0 top-0 -z-10 h-[420px] |
| 24 | + bg-[radial-gradient(900px_400px_at_50%_0%,rgba(147,187,251,0.15),transparent_70%)] |
| 25 | + dark:bg-[radial-gradient(900px_400px_at_50%_0%,rgba(109,124,255,0.18),transparent_70%)] |
| 26 | + " |
| 27 | + /> |
| 28 | + |
| 29 | + <h1 className="text-2xl font-bold tracking-tight sm:text-3xl md:text-4xl"> |
| 30 | + Batch <span className="opacity-90">22</span> |
| 31 | + </h1> |
32 | 32 |
|
33 | | - <div className="grow bg-base-300 w-full mt-16 px-8 py-12"> |
34 | | - <div className="flex justify-center items-center gap-12 flex-col md:flex-row"> |
35 | | - <div className="flex flex-col bg-base-100 px-10 py-10 text-center items-center max-w-xs rounded-3xl"> |
36 | | - <BugAntIcon className="h-8 w-8 fill-secondary" /> |
37 | | - <p> |
38 | | - Tinker with your smart contract using the{" "} |
39 | | - <Link href="/debug" passHref className="link"> |
40 | | - Debug Contracts |
41 | | - </Link>{" "} |
42 | | - tab. |
43 | | - </p> |
44 | | - </div> |
45 | | - <div className="flex flex-col bg-base-100 px-10 py-10 text-center items-center max-w-xs rounded-3xl"> |
46 | | - <MagnifyingGlassIcon className="h-8 w-8 fill-secondary" /> |
47 | | - <p> |
48 | | - Explore your local transactions with the{" "} |
49 | | - <Link href="/blockexplorer" passHref className="link"> |
50 | | - Block Explorer |
51 | | - </Link>{" "} |
52 | | - tab. |
53 | | - </p> |
54 | | - </div> |
55 | | - </div> |
| 33 | + <p className="mt-3 max-w-md text-sm text-base-content/70 sm:text-base md:text-lg"> |
| 34 | + A decentralized cohort learning and building Web3 |
| 35 | + </p> |
| 36 | + |
| 37 | + <div className="mt-6 h-px w-32 bg-gradient-to-r from-transparent via-base-content/20 to-transparent" /> |
| 38 | + |
| 39 | + {/* Batch status */} |
| 40 | + <div className="mt-10"> |
| 41 | + <BatchStatus /> |
56 | 42 | </div> |
57 | | - </div> |
58 | | - </> |
| 43 | + </section> |
| 44 | + |
| 45 | + {/* Actions */} |
| 46 | + <section className="relative -mt-8 flex justify-center pb-20"> |
| 47 | + <ActionCards /> |
| 48 | + </section> |
| 49 | + </div> |
59 | 50 | ); |
60 | 51 | }; |
61 | 52 |
|
|
0 commit comments