-
-
+
+ setRememberId(!rememberId)}
+ label="아이디 기억하기"
+ />
+ setAutoLogin(!autoLogin)}
+ label="자동 로그인"
+ />
{/* 로그인 버튼 */}
-
+
+
+
{/* 하단 링크 버튼들 */}
-
+
회원가입
+
+
{/* 카피라이트 */}
-
+
© 2024 XR LMS. All rights reserved.
+
+ {/* 에러 팝업 */}
+ {showErrorPopup && (
+
+
+
+
+
아이디 또는 비밀번호가 일치하지 않아요.
+
확인 후 다시 시도해 주세요.
+
+
+
+
+
+
+
+ )}
);
}
diff --git a/app/logo.svg b/app/logo.svg
new file mode 100644
index 0000000..b5adb10
--- /dev/null
+++ b/app/logo.svg
@@ -0,0 +1,9 @@
+
diff --git a/app/page.tsx b/app/page.tsx
index d7dacaa..e637e42 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -1,164 +1,47 @@
"use client";
-import Link from "next/link";
+import { useEffect, useState } from 'react';
+import { useRouter } from 'next/navigation';
+import LoginPage from './login/page';
-// 이미지 상수
-const imgLogo = "http://localhost:3845/assets/89fda8e949171025b1232bae70fc9d442e4e70c8.png";
+export default function HomePage() {
+ const router = useRouter();
+ const [isLoggedIn, setIsLoggedIn] = useState(false);
+ const [isLoading, setIsLoading] = useState(true);
-type CheckboxProps = {
- className?: string;
- status?: "Inactive" | "Focused" | "Disabled";
-};
+ useEffect(() => {
+ // 로그인 상태 확인
+ const loginStatus = localStorage.getItem('isLoggedIn') === 'true';
+ setIsLoggedIn(loginStatus);
+ setIsLoading(false);
+ }, []);
-function Checkbox({ className, status = "Inactive" }: CheckboxProps) {
+ if (isLoading) {
+ return null; // 로딩 중
+ }
+
+ // 로그인되지 않았으면 로그인 페이지 표시
+ if (!isLoggedIn) {
+ return
;
+ }
+
+ // 로그인되었으면 메인 페이지 표시
return (
-
- );
-}
+
+
+
메인 페이지
+
로그인 후 메인 페이지입니다.
-export default function LoginPage() {
- return (
-
- {/* 로고 */}
-
-
-

-
-
-
- {/* 콘텐츠 영역 */}
-
- {/* 입력 폼 영역 */}
-
- {/* 아이디 입력 필드 */}
-
-
- {/* 비밀번호 입력 필드 */}
-
-
- {/* 체크박스 영역 */}
-
-
-
- {/* 로그인 버튼 */}
-
-
-
- {/* 하단 링크 영역 */}
-
-
{
+ localStorage.removeItem('isLoggedIn');
+ router.push('/');
+ }}
+ className="mt-4 px-4 py-2 bg-red-500 text-white rounded-md hover:bg-red-600"
>
-
- 회원가입
-
-
-
-
-
-
-
-
- {/* 카피라이트 */}
-
-
- Copyright ⓒ 2025 XL LMS. All rights reserved
-
);
diff --git a/next.config.ts b/next.config.ts
index e9ffa30..b60527b 100644
--- a/next.config.ts
+++ b/next.config.ts
@@ -1,7 +1,9 @@
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
- /* config options here */
+ images: {
+ unoptimized: false,
+ },
};
export default nextConfig;
diff --git a/public/Divider.svg b/public/Divider.svg
new file mode 100644
index 0000000..54d4313
--- /dev/null
+++ b/public/Divider.svg
@@ -0,0 +1,3 @@
+
diff --git a/public/logo.png b/public/logo.png
deleted file mode 100644
index 4add0d7..0000000
Binary files a/public/logo.png and /dev/null differ
diff --git a/public/logo.svg b/public/logo.svg
new file mode 100644
index 0000000..b5adb10
--- /dev/null
+++ b/public/logo.svg
@@ -0,0 +1,9 @@
+