임시커밋
This commit is contained in:
26
app/(main)/trade/page.tsx
Normal file
26
app/(main)/trade/page.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* @file app/(main)/trade/page.tsx
|
||||
* @description 로그인 사용자 전용 트레이딩 페이지(Server Component)
|
||||
*/
|
||||
|
||||
import { redirect } from "next/navigation";
|
||||
import { TradeContainer } from "@/features/trade/components/TradeContainer";
|
||||
import { createClient } from "@/utils/supabase/server";
|
||||
|
||||
/**
|
||||
* 트레이딩 페이지
|
||||
* @returns TradeContainer UI
|
||||
* @see features/trade/components/TradeContainer.tsx 종목 검색/차트/호가/주문 기능을 제공합니다.
|
||||
*/
|
||||
export default async function TradePage() {
|
||||
// 상태 정의: 서버에서 세션을 먼저 확인해 비로그인 접근을 차단합니다.
|
||||
const supabase = await createClient();
|
||||
const {
|
||||
data: { user },
|
||||
} = await supabase.auth.getUser();
|
||||
|
||||
if (!user) redirect("/login");
|
||||
|
||||
return <TradeContainer />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user