영상생성 완료 화면 및 소셜 미디어 포스팅 화면 UI수정
This commit is contained in:
1 parent
29e0c7d79c
commit
be32a04dd0
3 files changed
+64
-125
No files matched your search
@@ -44,6 +44,7 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
const [isChannelDropdownOpen, setIsChannelDropdownOpen] = useState(false);
|
||||
const [isPrivacyDropdownOpen, setIsPrivacyDropdownOpen] = useState(false);
|
||||
const [isLoadingAutoDescription, setIsLoadingAutoDescription] = useState(false);
|
||||
const [isHorizontalVideo, setIsHorizontalVideo] = useState(false);
|
||||
const channelDropdownRef = useRef<HTMLDivElement>(null);
|
||||
const privacyDropdownRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
@@ -72,6 +73,16 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
return () => document.removeEventListener('mousedown', handleClickOutside);
|
||||
}, []);
|
||||
|
||||
// 모달 열릴 때 배경 스크롤 차단
|
||||
useEffect(() => {
|
||||
if (isOpen) {
|
||||
document.body.style.overflow = 'hidden';
|
||||
} else {
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
return () => { document.body.style.overflow = ''; };
|
||||
}, [isOpen]);
|
||||
|
||||
// 소셜 계정 로드
|
||||
useEffect(() => {
|
||||
if (isOpen) {
|
||||
@@ -297,9 +308,13 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
<div className="social-posting-video-container">
|
||||
<video
|
||||
src={video.result_movie_url}
|
||||
className="social-posting-video"
|
||||
className={`social-posting-video ${isHorizontalVideo ? 'horizontal' : 'vertical'}`}
|
||||
controls
|
||||
playsInline
|
||||
onLoadedMetadata={(e) => {
|
||||
const v = e.currentTarget;
|
||||
setIsHorizontalVideo(v.videoWidth > v.videoHeight);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user