[251120] fix: ShopNowContents navigateToDetail
🕐 커밋 시간: 2025. 11. 20. 14:13:29 📊 변경 통계: • 총 파일: 1개 • 추가: +48줄 • 삭제: -28줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/ShopNowContents.jsx 🔧 주요 변경 내용: • 소규모 기능 개선 • 코드 정리 및 최적화
This commit is contained in:
@@ -222,42 +222,62 @@ export default function ShopNowContents({
|
|||||||
const { originalPrice, discountedPrice, discountRate } = priceInfoMap[index] || {};
|
const { originalPrice, discountedPrice, discountRate } = priceInfoMap[index] || {};
|
||||||
|
|
||||||
const handleShopNowItemClick = () => {
|
const handleShopNowItemClick = () => {
|
||||||
// 현재 포커스된 요소의 spotlightId 저장
|
// ===== 기존 코드 (코멘트 처리) =====
|
||||||
const currentFocusedElement = Spotlight.getCurrent();
|
// // 현재 포커스된 요소의 spotlightId 저장
|
||||||
const currentSpotlightId = currentFocusedElement?.getAttribute('data-spotlight-id');
|
// const currentFocusedElement = Spotlight.getCurrent();
|
||||||
console.log('[ShopNowContents] 현재 포커스된 spotlightId:', currentSpotlightId);
|
// const currentSpotlightId = currentFocusedElement?.getAttribute('data-spotlight-id');
|
||||||
|
// console.log('[ShopNowContents] 현재 포커스된 spotlightId:', currentSpotlightId);
|
||||||
|
|
||||||
const params = {
|
// const params = {
|
||||||
tabTitle: tabTitle[tabIndex],
|
// tabTitle: tabTitle[tabIndex],
|
||||||
productId: prdtId,
|
// productId: prdtId,
|
||||||
productTitle: prdtNm,
|
// productTitle: prdtNm,
|
||||||
partner: patncNm,
|
// partner: patncNm,
|
||||||
brand: brndNm,
|
// brand: brndNm,
|
||||||
price: discountRate ? discountedPrice : originalPrice,
|
// price: discountRate ? discountedPrice : originalPrice,
|
||||||
showType: panelInfo?.shptmBanrTpNm,
|
// showType: panelInfo?.shptmBanrTpNm,
|
||||||
category: catNm,
|
// category: catNm,
|
||||||
discount: discountRate,
|
// discount: discountRate,
|
||||||
contextName: LOG_CONTEXT_NAME.SHOW,
|
// contextName: LOG_CONTEXT_NAME.SHOW,
|
||||||
messageId: LOG_MESSAGE_ID.CONTENTCLICK,
|
// messageId: LOG_MESSAGE_ID.CONTENTCLICK,
|
||||||
};
|
// };
|
||||||
dispatch(sendLogTotalRecommend(params));
|
// dispatch(sendLogTotalRecommend(params));
|
||||||
|
|
||||||
// DetailPanel push 전에 VideoPlayer 오버레이 숨김
|
// // DetailPanel push 전에 VideoPlayer 오버레이 숨김
|
||||||
dispatch(hidePlayerOverlays());
|
// dispatch(hidePlayerOverlays());
|
||||||
|
|
||||||
|
// dispatch(
|
||||||
|
// pushPanel({
|
||||||
|
// name: panel_names.DETAIL_PANEL,
|
||||||
|
// panelInfo: {
|
||||||
|
// showNm: playListInfo?.showNm,
|
||||||
|
// showId: playListInfo?.showId,
|
||||||
|
// liveFlag: playListInfo?.liveFlag,
|
||||||
|
// thumbnailUrl: playListInfo?.thumbnailUrl,
|
||||||
|
// liveReqFlag: panelInfo?.shptmBanrTpNm === 'LIVE' && 'Y',
|
||||||
|
// patnrId,
|
||||||
|
// prdtId,
|
||||||
|
// launchedFromPlayer: true,
|
||||||
|
// lastFocusedTargetId: currentSpotlightId, // 현재 포커스된 spotlightId 저장
|
||||||
|
// },
|
||||||
|
// })
|
||||||
|
// );
|
||||||
|
|
||||||
|
// ===== navigateToDetail 방식 (handleYouMayLikeItemClick 참고) =====
|
||||||
|
console.log('[ShopNowContents] ShopNow DetailPanel 진입 - sourceMenu:', SOURCE_MENUS.PLAYER_SHOP_NOW);
|
||||||
|
|
||||||
dispatch(
|
dispatch(
|
||||||
pushPanel({
|
navigateToDetail({
|
||||||
name: panel_names.DETAIL_PANEL,
|
patnrId,
|
||||||
panelInfo: {
|
prdtId,
|
||||||
|
sourceMenu: SOURCE_MENUS.PLAYER_SHOP_NOW,
|
||||||
|
additionalInfo: {
|
||||||
showNm: playListInfo?.showNm,
|
showNm: playListInfo?.showNm,
|
||||||
showId: playListInfo?.showId,
|
showId: playListInfo?.showId,
|
||||||
liveFlag: playListInfo?.liveFlag,
|
liveFlag: playListInfo?.liveFlag,
|
||||||
thumbnailUrl: playListInfo?.thumbnailUrl,
|
thumbnailUrl: playListInfo?.thumbnailUrl,
|
||||||
liveReqFlag: panelInfo?.shptmBanrTpNm === 'LIVE' && 'Y',
|
liveReqFlag: panelInfo?.shptmBanrTpNm === 'LIVE' && 'Y',
|
||||||
patnrId,
|
|
||||||
prdtId,
|
|
||||||
launchedFromPlayer: true,
|
launchedFromPlayer: true,
|
||||||
lastFocusedTargetId: currentSpotlightId, // 현재 포커스된 spotlightId 저장
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user