MCPcopy Create free account
hub / github.com/CodeWithHarry/Sigma-Web-Dev-Course / Home

Function Home

Video 137/linktree-clone/app/page.js:6–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4import { useRouter } from "next/navigation";
5
6export default function Home() {
7
8 const router = useRouter()
9 const [text, setText] = useState("")
10
11
12 const createTree = () => {
13
14 router.push(`/generate?handle=${text}`)
15 }
16 return (
17 <main>
18 <section className="bg-[#254f1a] min-h-[100vh] grid grid-cols-2">
19 <div className="flex justify-center flex-col ml-[10vw] gap-3">
20 <p className="text-yellow-300 font-bold text-7xl">Everything you </p>
21 <p className="text-yellow-300 font-bold text-7xl">are. In one,</p>
22 <p className="text-yellow-300 font-bold text-7xl">simple link in bio.</p>
23 <p className="text-yellow-300 text-xl my-4">Join 50M+ people using Linktree for their link in bio. One link to help you share everything you create, curate and sell from your Instagram, TikTok, Twitter, YouTube and other social media profiles.</p>
24 <div className="input flex gap-2">
25 <input value={text} onChange={(e)=> setText(e.target.value)} className="px-2 py-2 focus:outline-green-800 rounded-md" type="text" placeholder="Enter your Handle" />
26 <button onClick={()=> createTree()} className="bg-pink-300 rounded-full px-4 py-4 font-semibold">Claim your Bittree</button>
27 </div>
28 </div>
29 <div className="flex items-center justify-center flex-col mr-[10vw]">
30 <img src="/home.png" alt="homepage image" />
31
32 </div>
33 </section>
34 <section className="bg-red-700 min-h-[100vh]">
35
36 </section>
37 </main>
38 );
39}

Callers

nothing calls this directly

Calls 1

createTreeFunction · 0.85

Tested by

no test coverage detected