diff --git a/packages/react-app/app/page.tsx b/packages/react-app/app/page.tsx index 853e527a..2f50f132 100644 --- a/packages/react-app/app/page.tsx +++ b/packages/react-app/app/page.tsx @@ -1,13 +1,36 @@ 'use client'; import { useEffect, useState } from 'react'; +import { useAccount, useChainId } from 'wagmi'; +import { ArrowRightIcon, BeakerIcon, RocketLaunchIcon, CommandLineIcon } from '@heroicons/react/24/outline'; +import Link from 'next/link'; -import { useAccount } from 'wagmi'; +const features = [ + { + name: 'Faucet', + description: 'Get testnet tokens to start building', + icon: BeakerIcon, + href: 'https://faucet.celo.org/alfajores', + }, + { + name: 'Deploy', + description: 'Launch your dApp on Celo', + icon: RocketLaunchIcon, + href: 'https://github.com/celo-org/celo-composer/blob/main/docs/DEPLOYMENT_GUIDE.md', + }, + { + name: 'Develop', + description: 'Build with powerful tools', + icon: CommandLineIcon, + href: 'https://github.com/celo-org/celo-composer', + }, +]; export default function Home() { const [userAddress, setUserAddress] = useState(''); const [isMounted, setIsMounted] = useState(false); const { address, isConnected } = useAccount(); + const chainId = useChainId(); useEffect(() => { setIsMounted(true); @@ -19,20 +42,93 @@ export default function Home() { } }, [address, isConnected]); + const getNetworkBadge = () => { + // Celo Mainnet: 42220, Alfajores Testnet: 44787 + const isMainnet = chainId === 42220; + return ( + + {isMainnet ? 'Mainnet' : 'Testnet'} + + ); + }; + if (!isMounted) { return null; } return ( -
+ Build. Deploy. Scale. +
+ +{feature.description}
+