From e21adbaf000c5ca1c2f5211478cac6a2e7fbfdbd Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Fri, 7 Nov 2025 09:48:37 +0900
Subject: (김준회) SHI 로그인 화면도 비디오 배경화면 사용하도록 변경, 로그인
 화면 비디오 배경 공통컴포넌트로 추출
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/login/login-form.tsx | 62 ++---------------------------------------
 1 file changed, 3 insertions(+), 59 deletions(-)

(limited to 'components/login/login-form.tsx')

diff --git a/components/login/login-form.tsx b/components/login/login-form.tsx
index 51d54531..70a1e775 100644
--- a/components/login/login-form.tsx
+++ b/components/login/login-form.tsx
@@ -21,17 +21,7 @@ import {
 import { requestPasswordResetAction } from "@/lib/users/auth/partners-auth";
 import { checkEmailAndStartAuth, resendEmailOtp } from "@/lib/users/auth/email-auth";
 import Loading from "../common/loading/loading";
-
-// 배경 영상 목록
-const BACKGROUND_VIDEOS = [
-    '/background-videos/1.yard.mp4',
-    '/background-videos/2.SN2635_LNGC_CARDIFF.mp4',
-    '/background-videos/3.SN2628_CONT_WAN HAI.mp4',
-    '/background-videos/4.SN2612_LNGC_KGL.mp4',
-    '/background-videos/5.SN2596_LNGC_JP MORGAN.mp4',
-    '/background-videos/6.2235_FLNG_ENI_CORAL.mp4',
-    '/background-videos/7.2126_FLNG_PETRONAS.mp4',
-];
+import { VideoBackground } from "./video-background";
 
 export function LoginForm() {
     const params = useParams() || {};
@@ -44,9 +34,6 @@ export function LoginForm() {
     const { toast } = useToast();
     const { data: session, status } = useSession();
 
-    // 배경 영상 상태
-    const [currentVideoIndex, setCurrentVideoIndex] = useState(0);
-    
     // 상태 관리
     const [isFirstAuthLoading, setIsFirstAuthLoading] = useState(false);
     const [showForgotPassword, setShowForgotPassword] = useState(false);
@@ -83,14 +70,11 @@ export function LoginForm() {
     // 호스트명 확인 상태 추가
     const [isDataRoomHost, setIsDataRoomHost] = useState(false);
 
-    // 컴포넌트 마운트 시 호스트명 확인 및 랜덤 비디오 선택
+    // 컴포넌트 마운트 시 호스트명 확인
     useEffect(() => {
         if (typeof window !== 'undefined') {
             const hostname = window.location.hostname;
             setIsDataRoomHost(hostname.includes('shidataroom'));
-            
-            // 랜덤한 비디오 인덱스 선택
-            setCurrentVideoIndex(Math.floor(Math.random() * BACKGROUND_VIDEOS.length));
         }
     }, []);
 
@@ -168,11 +152,6 @@ export function LoginForm() {
         router.push(`/${lng}/partners/repository`);
     };
 
-    // 비디오 종료 시 다음 비디오로 전환
-    const handleVideoEnd = () => {
-        setCurrentVideoIndex((prevIndex) => (prevIndex + 1) % BACKGROUND_VIDEOS.length);
-    };
-
     // MFA 카운트다운 효과
     useEffect(() => {
         if (mfaCountdown > 0) {
@@ -949,42 +928,7 @@ export function LoginForm() {
             </div>
 
             {/* Right BG 영상 영역 */}
-            <div className="relative hidden h-full flex-col p-10 text-white dark:border-r md:flex overflow-hidden">
-                <div className="absolute inset-0">
-                    <video
-                        key={currentVideoIndex}
-                        autoPlay
-                        muted
-                        onEnded={handleVideoEnd}
-                        className="w-full h-full object-cover"
-                        playsInline
-                    >
-                        <source src={BACKGROUND_VIDEOS[currentVideoIndex]} type="video/mp4" />
-                    </video>
-                    {/* 어두운 오버레이 */}
-                    <div className="absolute inset-0 bg-black/30"></div>
-                </div>
-                <div className="relative z-10 mt-auto">
-                    <blockquote className="space-y-2 backdrop-blur-sm bg-black/20 p-4 rounded-lg">
-                        <p className="text-sm font-medium drop-shadow-lg">&ldquo;{t("blockquote")}&rdquo;</p>
-                    </blockquote>
-                </div>
-                {/* 비디오 인디케이터 */}
-                <div className="relative z-10 flex justify-center space-x-2 mb-4">
-                    {BACKGROUND_VIDEOS.map((_, index) => (
-                        <div
-                            key={index}
-                            className={cn(
-                                "w-2 h-2 rounded-full transition-all duration-300",
-                                index === currentVideoIndex 
-                                    ? "bg-white w-8" 
-                                    : "bg-white/50 hover:bg-white/75 cursor-pointer"
-                            )}
-                            onClick={() => setCurrentVideoIndex(index)}
-                        />
-                    ))}
-                </div>
-            </div>
+            <VideoBackground quote={t("blockquote")} />
         </div>
     )
 }
\ No newline at end of file
-- 
cgit v1.2.3

