"use client"; import { useState } from "react"; import Link from "next/link"; import MainLogo from "@/app/svgs/mainlogosvg" import LoginCheckboxActiveSvg from "@/app/svgs/logincheckboxactivesvg"; import LoginCheckboxInactiveSvg from "@/app/svgs/logincheckboxinactivesvg"; import LoginInputSvg from "@/app/svgs/inputformx"; import LoginErrorModal from "./LoginErrorModal"; import LoginOption from "@/app/login/LoginOption"; export default function LoginPage() { const [userId, setUserId] = useState(""); const [password, setPassword] = useState(""); const [rememberId, setRememberId] = useState(false); const [autoLogin, setAutoLogin] = useState(false); const [isUserIdFocused, setIsUserIdFocused] = useState(false); const [isPasswordFocused, setIsPasswordFocused] = useState(false); const [isLoginErrorOpen, setIsLoginErrorOpen] = useState(false); const [idError, setIdError] = useState(""); const [passwordError, setPasswordError] = useState(""); function handleSubmit(e: React.FormEvent) { e.preventDefault(); // 실제 로그인 API 연동 전까지는 실패 모달을 노출합니다. // API 연동 시 결과에 따라 성공/실패 분기에서 setIsLoginErrorOpen(true) 호출로 교체하세요. // if (userId.trim().length > 0 && password.trim().length > 0) { // setIsLoginErrorOpen(true); // } } return (
setIsLoginErrorOpen(false)} /> setIsLoginErrorOpen(true)} loginErrorModalEnabled={isLoginErrorOpen} setLoginErrorModalEnabled={setIsLoginErrorOpen} />
{/* 로고 영역 */}
XR LMS
{/* 폼 */}
{/* 아이디 */}
setUserId(e.target.value)} onFocus={() => setIsUserIdFocused(true)} onBlur={() => setIsUserIdFocused(false)} placeholder="아이디 (이메일)" className=" h-[40px] px-[12px] py-[7px] w-full rounded-[8px] border border-neutral-40 focus:outline-none focus:ring-0 focus:ring-offset-0 focus:shadow-none focus:appearance-none focus:border-neutral-700 text-[18px] text-neutral-700 font-normal leading-[150%] placeholder:text-input-placeholder-text pr-[40px] " /> {userId.trim().length > 0 && isUserIdFocused && ( )}
{/* 비밀번호 */}
setPassword(e.target.value)} onFocus={() => setIsPasswordFocused(true)} onBlur={() => setIsPasswordFocused(false)} placeholder="비밀번호" className=" h-[40px] px-[12px] py-[7px] rounded-[8px] w-full border border-neutral-40 focus:outline-none focus:ring-0 focus:ring-offset-0 focus:shadow-none focus:appearance-none focus:border-neutral-700 text-[18px] text-neutral-700 font-normal leading-[150%] placeholder:text-input-placeholder-text pr-[40px] " /> {password.trim().length > 0 && isPasswordFocused && ( )}
{/* 체크박스들 */}
{/* 로그인 버튼 */} {/* 하단 링크들 */}
회원가입
아이디 찾기 비밀번호 재설정

Copyright ⓒ 2025 XL LMS. All rights reserved

); }