38 lines
1.4 KiB
TypeScript
38 lines
1.4 KiB
TypeScript
/**
|
|
* @file app/(main)/dashboard/page.tsx
|
|
* @description 로그인 사용자 전용 대시보드 페이지(Server Component)
|
|
*/
|
|
|
|
import { redirect } from "next/navigation";
|
|
import { createClient } from "@/utils/supabase/server";
|
|
|
|
/**
|
|
* 대시보드 페이지 (향후 확장용)
|
|
* @returns 빈 대시보드 안내 UI
|
|
* @see app/(main)/trade/page.tsx 트레이딩 기능은 `/trade` 경로에서 제공합니다.
|
|
* @see app/(main)/settings/page.tsx KIS 인증 설정은 `/settings` 경로에서 제공합니다.
|
|
*/
|
|
export default async function DashboardPage() {
|
|
// 상태 정의: 서버에서 세션을 먼저 확인해 비로그인 접근을 차단합니다.
|
|
const supabase = await createClient();
|
|
const {
|
|
data: { user },
|
|
} = await supabase.auth.getUser();
|
|
|
|
if (!user) redirect("/login");
|
|
|
|
return (
|
|
<section className="mx-auto flex h-full w-full max-w-5xl flex-col justify-center p-6">
|
|
{/* ========== DASHBOARD PLACEHOLDER ========== */}
|
|
<div className="rounded-2xl border border-brand-200 bg-background p-8 shadow-sm dark:border-brand-800/45 dark:bg-brand-900/14">
|
|
<h1 className="text-2xl font-semibold tracking-tight text-foreground">
|
|
대시보드
|
|
</h1>
|
|
<p className="mt-2 text-sm text-muted-foreground">
|
|
이 페이지는 향후 포트폴리오 요약과 리포트 기능을 위한 확장 영역입니다.
|
|
</p>
|
|
</div>
|
|
</section>
|
|
);
|
|
}
|