Files
auto-trade/app/(home)/page.tsx

168 lines
8.4 KiB
TypeScript
Raw Normal View History

2026-02-10 11:16:39 +09:00
/**
* @file app/(home)/page.tsx
2026-02-10 11:16:39 +09:00
* @description (Server Component)
*/
import Link from "next/link";
2026-02-10 11:16:39 +09:00
import { ArrowRight, BarChart3, ShieldCheck, Sparkles, Zap } from "lucide-react";
import { Header } from "@/features/layout/components/header";
import { AUTH_ROUTES } from "@/features/auth/constants";
2026-02-10 11:16:39 +09:00
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import ShaderBackground from "@/components/ui/shader-background";
import { createClient } from "@/utils/supabase/server";
/**
2026-02-10 11:16:39 +09:00
*
* @returns UI
* @see features/layout/components/header.tsx blendWithBackground
*/
export default async function HomePage() {
2026-02-10 11:16:39 +09:00
// [로그인 상태 조회] 사용자 유무에 따라 CTA 링크를 분기합니다.
const supabase = await createClient();
const {
data: { user },
} = await supabase.auth.getUser();
return (
2026-02-10 11:16:39 +09:00
<div className="flex min-h-screen flex-col overflow-x-hidden bg-transparent">
<Header user={user} showDashboardLink={true} blendWithBackground={true} />
2026-02-10 11:16:39 +09:00
<main className="relative isolate flex-1 pt-16">
{/* ========== SHADER BACKGROUND SECTION ========== */}
<ShaderBackground opacity={1} className="-z-20" />
2026-02-10 11:16:39 +09:00
{/* ========== HERO SECTION ========== */}
<section className="container mx-auto max-w-7xl px-4 pb-10 pt-16 md:pt-24">
<div className="p-2 md:p-6">
<div className="mx-auto max-w-4xl text-center">
<span className="inline-flex items-center gap-2 rounded-full px-4 py-1.5 text-xs font-semibold text-brand-200 [text-shadow:0_2px_24px_rgba(0,0,0,0.65)]">
<Sparkles className="h-3.5 w-3.5" />
Shader Background Landing
</span>
2026-02-10 11:16:39 +09:00
<h1 className="mt-5 text-4xl font-black tracking-tight text-white [text-shadow:0_4px_30px_rgba(0,0,0,0.6)] md:text-6xl">
<br />
<span className="bg-linear-to-r from-brand-300 via-brand-400 to-brand-500 bg-clip-text text-transparent">
</span>
</h1>
2026-02-10 11:16:39 +09:00
<p className="mx-auto mt-5 max-w-2xl text-sm leading-relaxed text-white/80 [text-shadow:0_2px_16px_rgba(0,0,0,0.5)] md:text-lg">
, ,
. .
</p>
2026-02-10 11:16:39 +09:00
<div className="mt-8 flex flex-col items-center justify-center gap-3 sm:flex-row">
{/* [분기 렌더] 로그인 사용자는 대시보드, 비로그인 사용자는 가입/로그인 동선을 노출합니다. */}
{user ? (
<Button asChild size="lg" className="h-12 rounded-full bg-primary px-8 text-base hover:bg-primary/90">
<Link href={AUTH_ROUTES.DASHBOARD}>
<ArrowRight className="ml-1.5 h-4 w-4" />
</Link>
</Button>
) : (
<>
<Button asChild size="lg" className="h-12 rounded-full bg-primary px-8 text-base hover:bg-primary/90">
<Link href={AUTH_ROUTES.SIGNUP}>
<ArrowRight className="ml-1.5 h-4 w-4" />
</Link>
</Button>
<Button
asChild
variant="outline"
size="lg"
className="h-12 rounded-full border-white/40 bg-transparent px-8 text-base text-white hover:bg-white/10 hover:text-white"
>
<Link href={AUTH_ROUTES.LOGIN}></Link>
</Button>
</>
)}
</div>
</div>
2026-02-10 11:16:39 +09:00
<div className="mt-8 grid gap-3 sm:grid-cols-3">
<div className="rounded-2xl p-4 text-white [text-shadow:0_2px_12px_rgba(0,0,0,0.35)]">
<p className="text-xs text-white/70"> </p>
<p className="mt-1 text-lg font-bold">Low Latency</p>
</div>
<div className="rounded-2xl p-4 text-white [text-shadow:0_2px_12px_rgba(0,0,0,0.35)]">
<p className="text-xs text-white/70"></p>
<p className="mt-1 text-lg font-bold"> </p>
</div>
<div className="rounded-2xl p-4 text-white [text-shadow:0_2px_12px_rgba(0,0,0,0.35)]">
<p className="text-xs text-white/70"> </p>
<p className="mt-1 text-lg font-bold"> </p>
</div>
</div>
</div>
</section>
2026-02-10 11:16:39 +09:00
{/* ========== FEATURE SECTION ========== */}
<section className="container mx-auto max-w-7xl px-4 pb-16 md:pb-24">
<div className="grid gap-4 md:grid-cols-3">
<Card className="border-0 bg-transparent text-white shadow-none">
<CardHeader>
<div className="mb-2 inline-flex h-10 w-10 items-center justify-center rounded-xl bg-brand-400/20 text-brand-200">
<BarChart3 className="h-5 w-5" />
</div>
2026-02-10 11:16:39 +09:00
<CardTitle className="text-white [text-shadow:0_2px_12px_rgba(0,0,0,0.4)]"> </CardTitle>
</CardHeader>
<CardContent className="text-sm leading-relaxed text-white/75">
.
</CardContent>
</Card>
2026-02-10 11:16:39 +09:00
<Card className="border-0 bg-transparent text-white shadow-none">
<CardHeader>
<div className="mb-2 inline-flex h-10 w-10 items-center justify-center rounded-xl bg-brand-400/20 text-brand-200">
<Zap className="h-5 w-5" />
</div>
2026-02-10 11:16:39 +09:00
<CardTitle className="text-white [text-shadow:0_2px_12px_rgba(0,0,0,0.4)]"> </CardTitle>
</CardHeader>
<CardContent className="text-sm leading-relaxed text-white/75">
.
</CardContent>
</Card>
2026-02-10 11:16:39 +09:00
<Card className="border-0 bg-transparent text-white shadow-none">
<CardHeader>
<div className="mb-2 inline-flex h-10 w-10 items-center justify-center rounded-xl bg-brand-400/20 text-brand-200">
<ShieldCheck className="h-5 w-5" />
</div>
2026-02-10 11:16:39 +09:00
<CardTitle className="text-white [text-shadow:0_2px_12px_rgba(0,0,0,0.4)]"> </CardTitle>
</CardHeader>
<CardContent className="text-sm leading-relaxed text-white/75">
.
</CardContent>
</Card>
</div>
</section>
{/* ========== CTA SECTION ========== */}
<section className="container mx-auto max-w-7xl px-4 pb-20">
<div className="p-2 md:p-4">
<div className="flex flex-col items-start justify-between gap-4 md:flex-row md:items-center">
<div>
<p className="text-sm font-semibold text-brand-200 [text-shadow:0_2px_18px_rgba(0,0,0,0.45)]"> </p>
<h2 className="mt-1 text-2xl font-bold tracking-tight text-white [text-shadow:0_2px_18px_rgba(0,0,0,0.45)] md:text-3xl">
AutoTrade에서
</h2>
</div>
2026-02-10 11:16:39 +09:00
<Button asChild className="h-11 rounded-full bg-primary px-7 hover:bg-primary/90">
<Link href={user ? AUTH_ROUTES.DASHBOARD : AUTH_ROUTES.SIGNUP}>
{user ? "대시보드 열기" : "회원가입 시작"}
<ArrowRight className="ml-1.5 h-4 w-4" />
</Link>
</Button>
</div>
</div>
</section>
</main>
</div>
);
}