diff --git a/src/app/login/Welcome.tsx b/src/app/login/Welcome.tsx index 98666bd..b62d820 100644 --- a/src/app/login/Welcome.tsx +++ b/src/app/login/Welcome.tsx @@ -47,7 +47,7 @@ function Welcome({ open, onClose }: Props) { >
- +
diff --git a/src/shared/components/modalPop/ModalLayout.tsx b/src/shared/components/modalPop/ModalLayout.tsx index 63d4725..c522756 100644 --- a/src/shared/components/modalPop/ModalLayout.tsx +++ b/src/shared/components/modalPop/ModalLayout.tsx @@ -39,11 +39,26 @@ function ModalLayout({ return () => document.removeEventListener('keydown', handleKeyDown); }, [open, onClose]); + // 팝업 열릴 시 scroll 막기 + useEffect(() => { + if (open) document.body.style.overflow = 'hidden'; + else document.body.style.overflow = ''; + + return () => { + document.body.style.overflow = ''; + }; + }, [open]); + if (!open) return null; return ( -