|
1 | 1 | "use client"; |
2 | 2 |
|
3 | | -import Link from "next/link"; |
4 | 3 | import type { NextPage } from "next"; |
5 | 4 | import { useAccount } from "wagmi"; |
6 | | -import { BugAntIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline"; |
7 | | -import { Address } from "~~/components/scaffold-eth"; |
| 5 | +import { Creator } from "~~/components/Creator"; |
| 6 | +import { CreatorProfile } from "~~/components/CreatorProfile"; |
| 7 | +import { Fan } from "~~/components/Fan"; |
| 8 | +import { Profile } from "~~/components/Profile"; |
| 9 | +import { Subnames } from "~~/components/Subnames"; |
8 | 10 |
|
9 | 11 | const Home: NextPage = () => { |
10 | 12 | const { address: connectedAddress } = useAccount(); |
11 | 13 |
|
12 | 14 | return ( |
13 | | - <> |
14 | | - <div className="flex items-center flex-col grow pt-10"> |
15 | | - <div className="px-5"> |
16 | | - <h1 className="text-center"> |
17 | | - <span className="block text-2xl mb-2">Welcome to</span> |
18 | | - <span className="block text-4xl font-bold">Scaffold-ETH 2</span> |
| 15 | + <div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800"> |
| 16 | + <div className="container mx-auto px-4 py-16"> |
| 17 | + {/* Header */} |
| 18 | + <div className="text-center mb-16"> |
| 19 | + <h1 className="text-5xl font-bold text-gray-900 dark:text-white mb-4"> |
| 20 | + <span className="bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent">FanTag</span> |
19 | 21 | </h1> |
20 | | - <div className="flex justify-center items-center space-x-2 flex-col"> |
21 | | - <p className="my-2 font-medium">Connected Address:</p> |
22 | | - <Address address={connectedAddress} /> |
23 | | - </div> |
24 | | - |
25 | | - <p className="text-center text-lg"> |
26 | | - Get started by editing{" "} |
27 | | - <code className="italic bg-base-300 text-base font-bold max-w-full break-words break-all inline-block"> |
28 | | - packages/nextjs/app/page.tsx |
29 | | - </code> |
30 | | - </p> |
31 | | - <p className="text-center text-lg"> |
32 | | - Edit your smart contract{" "} |
33 | | - <code className="italic bg-base-300 text-base font-bold max-w-full break-words break-all inline-block"> |
34 | | - YourContract.sol |
35 | | - </code>{" "} |
36 | | - in{" "} |
37 | | - <code className="italic bg-base-300 text-base font-bold max-w-full break-words break-all inline-block"> |
38 | | - packages/hardhat/contracts |
39 | | - </code> |
| 22 | + <p className="text-xl text-gray-600 dark:text-gray-300 max-w-2xl mx-auto"> |
| 23 | + Create and claim ENS subdomains for creators and their communities. Connect with your favorite creators |
| 24 | + through decentralized identity. |
40 | 25 | </p> |
41 | 26 | </div> |
42 | 27 |
|
43 | | - <div className="grow bg-base-300 w-full mt-16 px-8 py-12"> |
44 | | - <div className="flex justify-center items-center gap-12 flex-col md:flex-row"> |
45 | | - <div className="flex flex-col bg-base-100 px-10 py-10 text-center items-center max-w-xs rounded-3xl"> |
46 | | - <BugAntIcon className="h-8 w-8 fill-secondary" /> |
47 | | - <p> |
48 | | - Tinker with your smart contract using the{" "} |
49 | | - <Link href="/debug" passHref className="link"> |
50 | | - Debug Contracts |
51 | | - </Link>{" "} |
52 | | - tab. |
53 | | - </p> |
| 28 | + {/* Main Content */} |
| 29 | + <div className="max-w-6xl mx-auto"> |
| 30 | + {!connectedAddress ? ( |
| 31 | + <div className="text-center"> |
| 32 | + <div className="bg-white dark:bg-gray-800 rounded-lg shadow-lg p-8 max-w-md mx-auto"> |
| 33 | + <h2 className="text-2xl font-semibold mb-4">Welcome to FanTag</h2> |
| 34 | + <p className="text-gray-600 dark:text-gray-400 mb-6"> |
| 35 | + Connect your wallet to start creating and claiming ENS subdomains |
| 36 | + </p> |
| 37 | + <div className="text-sm text-gray-500 dark:text-gray-400"> |
| 38 | + <p>🎯 Register as a creator</p> |
| 39 | + <p>🎪 Claim fan subdomains</p> |
| 40 | + <p>🔗 Build your Web3 identity</p> |
| 41 | + </div> |
| 42 | + </div> |
54 | 43 | </div> |
55 | | - <div className="flex flex-col bg-base-100 px-10 py-10 text-center items-center max-w-xs rounded-3xl"> |
56 | | - <MagnifyingGlassIcon className="h-8 w-8 fill-secondary" /> |
57 | | - <p> |
58 | | - Explore your local transactions with the{" "} |
59 | | - <Link href="/blockexplorer" passHref className="link"> |
60 | | - Block Explorer |
61 | | - </Link>{" "} |
62 | | - tab. |
63 | | - </p> |
| 44 | + ) : ( |
| 45 | + <div className="space-y-12"> |
| 46 | + {/* Full-width stacked sections */} |
| 47 | + <div className="space-y-8 w-screen max-w-3xl mx-auto"> |
| 48 | + <Profile /> |
| 49 | + <Subnames /> |
| 50 | + <CreatorProfile /> |
| 51 | + </div> |
| 52 | + |
| 53 | + {/* Actions Section */} |
| 54 | + <div className="grid grid-cols-1 md:grid-cols-2 gap-6"> |
| 55 | + <div className="flex justify-center"> |
| 56 | + <Creator /> |
| 57 | + </div> |
| 58 | + <div className="flex justify-center"> |
| 59 | + <Fan /> |
| 60 | + </div> |
| 61 | + </div> |
| 62 | + |
| 63 | + {/* Info Section */} |
| 64 | + <div className="bg-white dark:bg-gray-800 rounded-lg shadow-sm p-6"> |
| 65 | + <h3 className="text-lg font-semibold mb-4 text-center">How FanTag Works</h3> |
| 66 | + <div className="grid grid-cols-1 md:grid-cols-3 gap-6 text-center"> |
| 67 | + <div className="space-y-2"> |
| 68 | + <div className="text-2xl">🎨</div> |
| 69 | + <h4 className="font-medium">Creators Register</h4> |
| 70 | + <p className="text-sm text-gray-600 dark:text-gray-400"> |
| 71 | + Artists, musicians, and creators claim their .fantoken.eth domain |
| 72 | + </p> |
| 73 | + </div> |
| 74 | + <div className="space-y-2"> |
| 75 | + <div className="text-2xl">🎪</div> |
| 76 | + <h4 className="font-medium">Fans Follow</h4> |
| 77 | + <p className="text-sm text-gray-600 dark:text-gray-400"> |
| 78 | + Fans who follow creators can claim subdomains like alice.creator.fantoken.eth |
| 79 | + </p> |
| 80 | + </div> |
| 81 | + <div className="space-y-2"> |
| 82 | + <div className="text-2xl">🌐</div> |
| 83 | + <h4 className="font-medium">Web3 Identity</h4> |
| 84 | + <p className="text-sm text-gray-600 dark:text-gray-400"> |
| 85 | + Build your decentralized identity with ENS and social connections |
| 86 | + </p> |
| 87 | + </div> |
| 88 | + </div> |
| 89 | + </div> |
64 | 90 | </div> |
65 | | - </div> |
| 91 | + )} |
66 | 92 | </div> |
67 | 93 | </div> |
68 | | - </> |
| 94 | + </div> |
69 | 95 | ); |
70 | 96 | }; |
71 | 97 |
|
|
0 commit comments