From 3cc84ace177e5286585087a7a41f2ee0eff274bf Mon Sep 17 00:00:00 2001 From: optrader Date: Thu, 20 Nov 2025 18:35:09 +0900 Subject: [PATCH] [251120] fix: HomePanelr modal false to true Focus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ๐Ÿ• ์ปค๋ฐ‹ ์‹œ๊ฐ„: 2025. 11. 20. 18:35:09 ๐Ÿ“Š ๋ณ€๊ฒฝ ํ†ต๊ณ„: โ€ข ์ด ํŒŒ์ผ: 1๊ฐœ โ€ข ์ถ”๊ฐ€: +47์ค„ ๐Ÿ“ ์ˆ˜์ •๋œ ํŒŒ์ผ: ~ com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx ๐Ÿ”ง ์ฃผ์š” ๋ณ€๊ฒฝ ๋‚ด์šฉ: โ€ข ์†Œ๊ทœ๋ชจ ๊ธฐ๋Šฅ ๊ฐœ์„  --- .../src/views/HomePanel/HomePanel.jsx | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx b/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx index 4675a99a..213d3e62 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx @@ -149,6 +149,13 @@ const HomePanel = ({ isOnTop, showGradientBackground = false }) => { return playerPanel?.panelInfo?.shouldShrinkTo1px ?? false; }); + // โœ… PlayerPanel์˜ modal ์ƒํƒœ ์ถ”์  (false โ†’ true ๊ฐ์ง€์šฉ) + const playerModalState = useSelector((state) => { + const playerPanel = state.panels.panels.find((p) => p.name === panel_names.PLAYER_PANEL); + return playerPanel?.panelInfo?.modal ?? false; + }); + const prevPlayerModalStateRef = useRef(false); + const categoryInfos = useSelector((state) => state.onSale.homeOnSaleData?.data?.categoryInfos); const categoryItemInfos = useSelector((state) => state.main.subCategoryData?.categoryItemInfos); @@ -989,6 +996,46 @@ const HomePanel = ({ isOnTop, showGradientBackground = false }) => { } }, [verticalPagenatorRef]); + // โœ… PlayerPanel modal ์ƒํƒœ ๋ณ€ํ™” ๊ฐ์ง€ (false โ†’ true) : Fullscreen -> Banner + useEffect(() => { + const prevModalState = prevPlayerModalStateRef.current; + + console.log('[HomePanel] ๐Ÿ” Modal ์ƒํƒœ ์ฒดํฌ:', { + prevModalState, + playerModalState, + shouldExecute: prevModalState === false && playerModalState === true + }); + + if (prevModalState === false && playerModalState === true) { + + console.log('>>>>>[HomePanel] โ–ถ๏ธ PlayerPanel์ด Fullscreen์—์„œ Banner๋กœ ์ „ํ™˜๋จ'); + // 0.5์ดˆ ํ›„ ๋น„๋””์˜ค๊ฐ€ ์žฌ์ƒ๋˜๋Š” ๋ฐฐ๋„ˆ์— ํฌ์ปค์Šค ํ…Œ๋‘๋ฆฌ ํšจ๊ณผ ์ ์šฉ + // const focusTimer = setTimeout(() => { + // if (videoPlayIntentRef.current?.bannerId) { + // const bannerId = videoPlayIntentRef.current.bannerId; + // const bannerElement = document.querySelector(`[data-spotlight-id="${bannerId}"]`); + + // if (bannerElement) { + // // ํฌ์ปค์Šค ํ…Œ๋‘๋ฆฌ ํšจ๊ณผ ์ ์šฉ (๊ธฐ์กด .focused mixin ์Šคํƒ€์ผ ์ ์šฉ) + // bannerElement.style.border = '4px solid #c70850'; + // bannerElement.style.borderRadius = '12px'; + // bannerElement.style.boxShadow = '0 0 22px 0 rgba(0, 0, 0, 0.5)'; + // bannerElement.style.transition = 'all 0.3s ease'; + + // // 2์ดˆ ํ›„ ํšจ๊ณผ ์ œ๊ฑฐ + // setTimeout(() => { + // bannerElement.style.border = ''; + // bannerElement.style.borderRadius = ''; + // bannerElement.style.boxShadow = ''; + // }, 2000); + // } + // } + // }, 500); + } + + prevPlayerModalStateRef.current = playerModalState; + }, [playerModalState, videoPlayIntentRef]); + // โœ… Cleanup: ์ปดํฌ๋„ŒํŠธ ์–ธ๋งˆ์šดํŠธ ์‹œ ๋ชจ๋“  ํƒ€์ด๋จธ ์ •๋ฆฌ useEffect(() => { return () => {