From 9c58cf247711b4a803711aff765cb453e3842c57 Mon Sep 17 00:00:00 2001 From: optrader Date: Thu, 20 Nov 2025 13:58:13 +0900 Subject: [PATCH] [251120] fix: ShopNowContents ItemCard Click MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ๐Ÿ• ์ปค๋ฐ‹ ์‹œ๊ฐ„: 2025. 11. 20. 13:58:12 ๐Ÿ“Š ๋ณ€๊ฒฝ ํ†ต๊ณ„: โ€ข ์ด ํŒŒ์ผ: 3๊ฐœ โ€ข ์ถ”๊ฐ€: +22์ค„ โ€ข ์‚ญ์ œ: -13์ค„ ๐Ÿ“ ์ˆ˜์ •๋œ ํŒŒ์ผ: ~ com.twin.app.shoptime/src/actions/panelActions.js ~ com.twin.app.shoptime/src/views/HomePanel/HomePanel.module.less ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/ShopNowContents.jsx ๐Ÿ”ง ์ฃผ์š” ๋ณ€๊ฒฝ ๋‚ด์šฉ: โ€ข ํ•ต์‹ฌ ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง ๊ฐœ์„  โ€ข ์†Œ๊ทœ๋ชจ ๊ธฐ๋Šฅ ๊ฐœ์„  โ€ข ์ฝ”๋“œ ์ •๋ฆฌ ๋ฐ ์ตœ์ ํ™” --- .../src/actions/panelActions.js | 24 ++++++++++++------- .../src/views/HomePanel/HomePanel.module.less | 2 +- .../TabContents/ShopNowContents.jsx | 9 +++---- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/com.twin.app.shoptime/src/actions/panelActions.js b/com.twin.app.shoptime/src/actions/panelActions.js index 14038a0a..fd585009 100644 --- a/com.twin.app.shoptime/src/actions/panelActions.js +++ b/com.twin.app.shoptime/src/actions/panelActions.js @@ -105,14 +105,7 @@ export const navigateToDetail = ({ timestamp: Date.now(), }); - // โœ… ๊ทธ๋ผ๋ฐ์ด์…˜ ๋ฐฐ๊ฒฝ ํ‘œ์‹œ - HomePanelโ†’DetailPanel ์ „ํ™˜ ์‹œ - dispatch(updateHomeInfo({ - name: panel_names.HOME_PANEL, - panelInfo: { - showGradientBackground: true, - } - })); - console.log('[TRACE-GRADIENT] ๐ŸŸข navigateToDetail set showGradientBackground: true - source:', sourceMenu); + // โœ… ๊ทธ๋ผ๋ฐ์ด์…˜ ๋ฐฐ๊ฒฝ์€ HomePanel ๋‚ด๋ถ€ switch ๋ฌธ์—์„œ ์ฒ˜๋ฆฌ // sourceMenu์— ๋”ฐ๋ฅธ ์‚ฌ์ „ ์ฒ˜๋ฆฌ switch (sourceMenu) { @@ -124,6 +117,21 @@ export const navigateToDetail = ({ case SOURCE_MENUS.HOME_RANDOM_UNIT: case SOURCE_MENUS.HOME_ROLLING_UNIT: case SOURCE_MENUS.HOME_GENERAL: { + + // โœ… ๊ทธ๋ผ๋ฐ์ด์…˜ ๋ฐฐ๊ฒฝ ํ‘œ์‹œ - HomePanelโ†’DetailPanel ์ „ํ™˜ ์‹œ (PlayerPanel ์ถœ์‹  ์ œ์™ธ) + + if (!panelInfo.launchedFromPlayer) { + dispatch(updateHomeInfo({ + name: panel_names.HOME_PANEL, + panelInfo: { + showGradientBackground: true, + } + })); + console.log('[TRACE-GRADIENT] ๐ŸŸข navigateToDetail set showGradientBackground: true - source:', sourceMenu); + } else { + console.log('[TRACE-GRADIENT] ๐Ÿ”ต navigateToDetail skipped gradient - launchedFromPlayer: true'); + } + // HomePanel Redux ์ƒํƒœ์— ํฌ์ปค์Šค ์Šค๋ƒ…์ƒท ์ €์žฅ (Detailโ†’Home ๋ณต๊ท€ ์‹œ ์‚ฌ์šฉ) if (Object.keys(focusSnapshot).length > 0) { dispatch( diff --git a/com.twin.app.shoptime/src/views/HomePanel/HomePanel.module.less b/com.twin.app.shoptime/src/views/HomePanel/HomePanel.module.less index c8695683..cf22d565 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/HomePanel.module.less +++ b/com.twin.app.shoptime/src/views/HomePanel/HomePanel.module.less @@ -70,7 +70,7 @@ // ํ™œ์„ฑํ™” ์ƒํƒœ - ์ „์ฒด ํ™”๋ฉด์„ ์–ด๋‘ก๊ฒŒ ํ•˜๋Š” ๋‹จ์ƒ‰ ๋ฐฐ๊ฒฝ &.visible { display: block; - background: rgba(0, 0, 0, 0.85); // 85% ํˆฌ๋ช…๋„์˜ ๊ฒ€์€์ƒ‰์œผ๋กœ ์ „์ฒด ํ™”๋ฉด ์–ด๋‘ก๊ฒŒ + background: rgba(0, 0, 0, 0.75); // 75% ํˆฌ๋ช…๋„์˜ ๊ฒ€์€์ƒ‰์œผ๋กœ ์ „์ฒด ํ™”๋ฉด ์–ด๋‘ก๊ฒŒ } } diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/ShopNowContents.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/ShopNowContents.jsx index 4ac2b85b..42f7c1be 100644 --- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/ShopNowContents.jsx +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/ShopNowContents.jsx @@ -150,7 +150,7 @@ export default function ShopNowContents({ // YouMayLike ์‹œ์ž‘ ์ง€์  ์—ฌ๋ถ€ (๊ตฌ๋ถ„์„  ํ‘œ์‹œ) const isYouMayLikeStart = shopNowInfo && index === shopNowInfo.length; - const handleItemClick = () => { + const handleYouMayLikeItemClick = () => { console.log('[ShopNowContents] DetailPanel ์ง„์ž… - sourceMenu:', SOURCE_MENUS.PLAYER_SHOP_NOW); dispatch( @@ -163,6 +163,7 @@ export default function ShopNowContents({ showId: playListInfo?.showId, liveFlag: playListInfo?.liveFlag, thumbnailUrl: playListInfo?.thumbnailUrl, + launchedFromPlayer: true, }, }) ); @@ -184,7 +185,7 @@ export default function ShopNowContents({ offerInfo={offerInfo} productName={prdtNm} productId={prdtId} - onClick={handleItemClick} + onClick={handleYouMayLikeItemClick} onFocus={() => { if (handleItemFocus) { handleItemFocus(LOG_MENU.FULL_YOU_MAY_LIKE); @@ -220,7 +221,7 @@ export default function ShopNowContents({ // ๋ฏธ๋ฆฌ ๊ณ„์‚ฐ๋œ ๊ฐ€๊ฒฉ ์ •๋ณด๋ฅผ ์‚ฌ์šฉ const { originalPrice, discountedPrice, discountRate } = priceInfoMap[index] || {}; - const handleItemClick = () => { + const handleShopNowItemClick = () => { // ํ˜„์žฌ ํฌ์ปค์Šค๋œ ์š”์†Œ์˜ spotlightId ์ €์žฅ const currentFocusedElement = Spotlight.getCurrent(); const currentSpotlightId = currentFocusedElement?.getAttribute('data-spotlight-id'); @@ -274,7 +275,7 @@ export default function ShopNowContents({ offerInfo={offerInfo} productName={prdtNm} productId={prdtId} - onClick={handleItemClick} + onClick={handleShopNowItemClick} onFocus={handleFocus()} spotlightId={`shop-now-item-${index}`} onSpotlightUp={