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