Files
auto-trade/app/(main)/dashboard/page.tsx

26 lines
847 B
TypeScript
Raw Normal View History

/**
* @file app/(main)/dashboard/page.tsx
2026-02-06 17:50:35 +09:00
* @description (Server Component)
*/
2026-02-06 17:50:35 +09:00
import { redirect } from "next/navigation";
2026-02-12 14:20:07 +09:00
import { DashboardContainer } from "@/features/dashboard/components/DashboardContainer";
import { createClient } from "@/utils/supabase/server";
/**
2026-02-12 14:20:07 +09:00
*
* @returns DashboardContainer UI
* @see features/dashboard/components/DashboardContainer.tsx // UI를 .
*/
export default async function DashboardPage() {
2026-02-06 17:50:35 +09:00
// 상태 정의: 서버에서 세션을 먼저 확인해 비로그인 접근을 차단합니다.
const supabase = await createClient();
2026-02-06 17:50:35 +09:00
const {
data: { user },
} = await supabase.auth.getUser();
2026-02-06 17:50:35 +09:00
if (!user) redirect("/login");
2026-02-12 14:20:07 +09:00
return <DashboardContainer />;
}