From 42eda7e0bbf93c3b1ec1a071fc0ec2b95c2f15fb Mon Sep 17 00:00:00 2001 From: optrader Date: Wed, 26 Nov 2025 12:45:17 +0900 Subject: [PATCH] [251126] fix: Log Migration - DetailPanel sendLogGNB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ๐Ÿ• ์ปค๋ฐ‹ ์‹œ๊ฐ„: 2025. 11. 26. 12:45:16 ๐Ÿ“Š ๋ณ€๊ฒฝ ํ†ต๊ณ„: โ€ข ์ด ํŒŒ์ผ: 3๊ฐœ โ€ข ์ถ”๊ฐ€: +71์ค„ โ€ข ์‚ญ์ œ: -1์ค„ ๐Ÿ“ ์ˆ˜์ •๋œ ํŒŒ์ผ: ~ com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx ~ com.twin.app.shoptime/src/views/DetailPanel/ProductContentSection/YouMayAlsoLike/YouMayAlsoLike.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx ๐Ÿ”ง ์ฃผ์š” ๋ณ€๊ฒฝ ๋‚ด์šฉ: โ€ข ์†Œ๊ทœ๋ชจ ๊ธฐ๋Šฅ ๊ฐœ์„  --- .../ProductAllSection/ProductAllSection.jsx | 58 ++++++++++++++++++- .../YouMayAlsoLike/YouMayAlsoLike.jsx | 3 + .../src/views/PlayerPanel/PlayerPanel.jsx | 11 ++++ 3 files changed, 71 insertions(+), 1 deletion(-) diff --git a/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx b/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx index adb6e497..bf264351 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx @@ -33,6 +33,11 @@ import { setHidePopup, setShowPopup, } from '../../../actions/commonActions.js'; +import { + sendLogGNB, +} from '../../../actions/logActions'; +import { updatePanel } from '../../../actions/panelActions'; +import { panel_names } from '../../../utils/Config'; import { getProductCouponDownload, getProductCouponSearch, @@ -59,7 +64,6 @@ import TVirtualGridList import useReviews from '../../../hooks/useReviews/useReviews'; import useScrollTo from '../../../hooks/useScrollTo'; import { BUYNOW_CONFIG } from '../../../utils/BuyNowConfig'; -import { panel_names } from '../../../utils/Config'; import * as Config from '../../../utils/Config.js'; import { andThen, @@ -242,6 +246,7 @@ export default function ProductAllSection({ // Redux ์ƒํƒœ const webOSVersion = useSelector((state) => state.common.appStatus.webOSVersion); const groupInfos = useSelector((state) => state.product.groupInfo); + const nowMenu = useSelector((state) => state.common.menu.nowMenu); // YouMayLike ๋ฐ์ดํ„ฐ๋Š” API ์‘๋‹ต ์‹œ๊ฐ„์ด ๊ฑธ๋ฆฌ๋ฏ€๋กœ ์ง์ ‘ ๊ตฌ๋… const youmaylikeData = useSelector((state) => state.main.youmaylikeData); @@ -263,6 +268,18 @@ export default function ProductAllSection({ const [isShowQRCode, setIsShowQRCode] = useState(true); const timerRef = useRef(null); + // sendLogGNB์šฉ entryMenu + const entryMenuRef = useRef(null); + + // ์ถœ์ฒ˜ ์ •๋ณด ํ†ตํ•ฉ (ํ–ฅํ›„ ํ™•์žฅ์„ฑ ๋Œ€๋น„) + // YouMayLike ์ƒํ’ˆ์ด ์•„๋‹ ๊ฒฝ์šฐ fromPanel์„ ์ดˆ๊ธฐํ™”ํ•˜์—ฌ ์˜ค๊ธฐ ๋ฐฉ์ง€ + const fromPanel = useMemo(() => ({ + fromYouMayLike: panelInfo?.fromPanel?.fromYouMayLike || false, + // ํ–ฅํ›„ ๋‹ค๋ฅธ ์ถœ์ฒ˜ ํ”Œ๋ž˜๊ทธ๋“ค ์ถ”๊ฐ€ ๊ฐ€๋Šฅ + // fromRecommendation: panelInfo?.fromPanel?.fromRecommendation || false, + // fromSearch: panelInfo?.fromPanel?.fromSearch || false, + }), [panelInfo?.fromPanel?.fromYouMayLike]); + //๊ตฌ๋งค ํ•˜๋‹จ ํ† ์ŠคํŠธ ๋…ธ์ถœ ํ™•์ธ์„ ์œ„ํ•œ ์šฉ๋„ const [openToast, setOpenToast] = useState(false); @@ -652,6 +669,45 @@ export default function ProductAllSection({ dispatch(resetShowAllReviews()); }, []); // ๋นˆ dependency array = ๋งˆ์šดํŠธ ์‹œ์—๋งŒ ์‹คํ–‰ + // sendLogGNB ๋กœ๊น… - Source์˜ DetailPanel ์ปดํฌ๋„ŒํŠธ๋“ค๊ณผ ๋™์ผํ•œ ํŒจํ„ด + useEffect(() => { + if (!entryMenuRef.current) entryMenuRef.current = nowMenu; + + // BUY NOW ๋ฒ„ํŠผ ํ™œ์„ฑํ™” ์ƒํƒœ์— ๋”ฐ๋ฅธ ๋ฉ”๋‰ด ๊ฒฐ์ • (Source SingleProduct vs UnableProduct ํŒจํ„ด) + let baseMenu; + if (isTravelProductVisible) { + baseMenu = Config.LOG_MENU.DETAIL_PAGE_TRAVEL_THEME_DETAIL; + } else if (isGroupProductVisible) { + baseMenu = Config.LOG_MENU.DETAIL_PAGE_GROUP_DETAIL; + } else if (isBillingProductVisible) { + // BUY NOW ๋ฒ„ํŠผ ํ™œ์„ฑํ™” = SingleProduct + baseMenu = Config.LOG_MENU.DETAIL_PAGE_BILLING_PRODUCT_DETAIL; + } else { + // BUY NOW ๋ฒ„ํŠผ ๋น„ํ™œ์„ฑํ™” = UnableProduct + baseMenu = Config.LOG_MENU.DETAIL_PAGE_PRODUCT_DETAIL; + } + + // YouMayLike์—์„œ ์ƒํ’ˆ ์„ ํƒ ์‹œ ๋ฉ”๋‰ด ๋ณ€๊ฒฝ (Source์˜ isYouMayLikeOpened์™€ ๋™์ผ ํŒจํ„ด) + const menu = (fromPanel?.fromYouMayLike !== undefined && fromPanel?.fromYouMayLike === true) + ? `${baseMenu}/${Config.LOG_MENU.DETAIL_PAGE_YOU_MAY_LIKE}` + : baseMenu; + + dispatch(sendLogGNB(menu)); + + // sendLogGNB ์ „์†ก ํ›„ ํ”Œ๋ž˜๊ทธ ์ดˆ๊ธฐํ™” (1ํšŒ ์‚ฌ์šฉ ํ›„ ๋น„ํ™œ์„ฑํ™”) + if (fromPanel?.fromYouMayLike === true) { + dispatch(updatePanel({ + name: panel_names.DETAIL_PANEL, + panelInfo: { + ...panelInfo, + fromPanel: { + fromYouMayLike: false // ํ”Œ๋ž˜๊ทธ ์ดˆ๊ธฐํ™” + } + } + })); + } +}, [fromPanel?.fromYouMayLike, isBillingProductVisible, isUnavailableProductVisible, isGroupProductVisible, isTravelProductVisible]); // BUY NOW ์ƒํƒœ ๋ณ€๊ฒฝ ์‹œ ์žฌ์‹คํ–‰ + // [251115] ์ฃผ์„ ์ฒ˜๋ฆฌ: MediaPanel์—์„œ ์ด๋ฏธ ํฌ์ปค์Šค ์ด๋™์„ ์ฒ˜๋ฆฌํ•˜๋ฏ€๋กœ // ProductAllSection์˜ ์ž๋™ ํฌ์ปค์Šค๋Š” ํฌ์ปค์Šค ํƒˆ์ทจ๋ฅผ ์ผ์œผํ‚ฌ ์ˆ˜ ์žˆ์Œ // useEffect(() => { diff --git a/com.twin.app.shoptime/src/views/DetailPanel/ProductContentSection/YouMayAlsoLike/YouMayAlsoLike.jsx b/com.twin.app.shoptime/src/views/DetailPanel/ProductContentSection/YouMayAlsoLike/YouMayAlsoLike.jsx index a21f3922..90eb3116 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/ProductContentSection/YouMayAlsoLike/YouMayAlsoLike.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/ProductContentSection/YouMayAlsoLike/YouMayAlsoLike.jsx @@ -169,6 +169,9 @@ export default function YouMayAlsoLike({ prdtId, launchedFromPlayer: launchedFromPlayer, bgVideoInfo: bgVideoInfo, // ๋ฐฑ๊ทธ๋ผ์šด๋“œ ๋น„๋””์˜ค ์ •๋ณด ์œ ์ง€ + fromPanel: { + fromYouMayLike: true, // YouMayLike์—์„œ ์„ ํƒ๋œ ์ƒํ’ˆ์ž„์„ ํ‘œ์‹œ +}, // ์ถœ์ฒ˜ ์ •๋ณด ํ†ตํ•ฉ ๊ฐ์ฒด }, }) ); diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx index 23952d3f..512d3247 100644 --- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx @@ -718,6 +718,13 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props panelInfo?.modal && liveLogParamsRef.current?.showId === panelInfo?.showId ) { + dlog('[PlayerPanel] ๐Ÿ“ก LIVE Modal Log Ready and Conditions Met:', { + isModalLiveLogReady: logStatus.isModalLiveLogReady, + isOnTop, + isModal: panelInfo?.modal, + showIdMatch: liveLogParamsRef.current?.showId === panelInfo?.showId, + logParams: liveLogParamsRef.current, + }); let watchStrtDt = formatGMTString(new Date()); watchIntervalLive.current = setInterval(() => { @@ -736,6 +743,10 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props isModalLiveLogReady: false, })); clearInterval(watchIntervalLive.current); + dlog('[PlayerPanel] ๐Ÿš€ Dispatching LIVE Modal Log:', { + logParams: liveLogParamsRef.current, + watchStrtDt, + }); dispatch( sendLogLive({ ...liveLogParamsRef.current, watchStrtDt }, () => dispatch(changeLocalSettings({ watchRecord: {} }))