File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { auth } from "@clerk/nextjs/server" ;
12import { Cloud , Shield , Users , Zap } from "lucide-react" ;
23import Link from "next/link" ;
4+ import { redirect } from "next/navigation" ;
5+
36import { Button } from "~/components/ui/button" ;
47
58export default function HomePage ( ) {
@@ -49,14 +52,23 @@ export default function HomePage() {
4952 documents from any device, anywhere in the world.
5053 </ p >
5154
52- < div className = "pt-8" >
55+ < form
56+ className = "pt-8"
57+ action = { async ( ) => {
58+ "use server" ;
59+ const session = await auth ( ) ;
60+ if ( ! session . userId ) return redirect ( "/sign-in" ) ;
61+ redirect ( "/drive" ) ;
62+ } }
63+ >
5364 < Button
5465 size = "lg"
55- className = "rounded-full bg-white px-8 py-6 text-lg font-semibold text-black transition-all duration-200 hover:scale-105 hover:bg-gray-100"
66+ className = "cursor-pointer rounded-full bg-white px-8 py-6 text-lg font-semibold text-black transition-all duration-200 hover:scale-105 hover:bg-gray-100"
67+ type = "submit"
5668 >
5769 Get Started
5870 </ Button >
59- </ div >
71+ </ form >
6072
6173 < p className = "pt-4 text-sm text-gray-400" >
6274 Free 15GB storage • No credit card required
Original file line number Diff line number Diff line change 1+ export default function DrivePage ( ) {
2+ return < div /> ;
3+ }
Original file line number Diff line number Diff line change 1+ import { SignInButton } from "@clerk/nextjs" ;
2+
3+ export default function HomePage ( ) {
4+ return (
5+ < div className = "min-h-screen bg-gradient-to-br from-black via-gray-900 to-gray-800 text-white" >
6+ < main className = "mx-auto flex max-w-4xl flex-col items-center justify-center px-6 py-20 text-center" >
7+ < div className = "space-y-8" >
8+ < h1 className = "text-5xl font-bold tracking-tight md:text-7xl" >
9+ Your files,
10+ < br />
11+ < span className = "bg-gradient-to-r from-gray-400 to-gray-200 bg-clip-text text-transparent" >
12+ everywhere
13+ </ span >
14+ </ h1 >
15+
16+ < p className = "mx-auto max-w-2xl text-xl leading-relaxed text-gray-300 md:text-2xl" >
17+ Store, sync, and share your files with T4S Drive. Access your
18+ documents from any device, anywhere in the world.
19+ </ p >
20+
21+ < SignInButton />
22+ </ div >
23+ </ main >
24+ </ div >
25+ ) ;
26+ }
You can’t perform that action at this time.
0 commit comments