[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 handleShopNowItemClick = () => {
|
||||
// 현재 포커스된 요소의 spotlightId 저장
|
||||
const currentFocusedElement = Spotlight.getCurrent();
|
||||
const currentSpotlightId = currentFocusedElement?.getAttribute('data-spotlight-id');
|
||||
console.log('[ShopNowContents] 현재 포커스된 spotlightId:', currentSpotlightId);
|
||||
// ===== 기존 코드 (코멘트 처리) =====
|
||||
// // 현재 포커스된 요소의 spotlightId 저장
|
||||
// const currentFocusedElement = Spotlight.getCurrent();
|
||||
// const currentSpotlightId = currentFocusedElement?.getAttribute('data-spotlight-id');
|
||||
// console.log('[ShopNowContents] 현재 포커스된 spotlightId:', currentSpotlightId);
|
||||
|
||||
const params = {
|
||||
tabTitle: tabTitle[tabIndex],
|
||||
productId: prdtId,
|
||||
productTitle: prdtNm,
|
||||
partner: patncNm,
|
||||
brand: brndNm,
|
||||
price: discountRate ? discountedPrice : originalPrice,
|
||||
showType: panelInfo?.shptmBanrTpNm,
|
||||
category: catNm,
|
||||
discount: discountRate,
|
||||
contextName: LOG_CONTEXT_NAME.SHOW,
|
||||
messageId: LOG_MESSAGE_ID.CONTENTCLICK,
|
||||
};
|
||||
dispatch(sendLogTotalRecommend(params));
|
||||
// const params = {
|
||||
// tabTitle: tabTitle[tabIndex],
|
||||
// productId: prdtId,
|
||||
// productTitle: prdtNm,
|
||||
// partner: patncNm,
|
||||
// brand: brndNm,
|
||||
// price: discountRate ? discountedPrice : originalPrice,
|
||||
// showType: panelInfo?.shptmBanrTpNm,
|
||||
// category: catNm,
|
||||
// discount: discountRate,
|
||||
// contextName: LOG_CONTEXT_NAME.SHOW,
|
||||
// messageId: LOG_MESSAGE_ID.CONTENTCLICK,
|
||||
// };
|
||||
// dispatch(sendLogTotalRecommend(params));
|
||||
|
||||
// DetailPanel push 전에 VideoPlayer 오버레이 숨김
|
||||
dispatch(hidePlayerOverlays());
|
||||
// // DetailPanel push 전에 VideoPlayer 오버레이 숨김
|
||||
// 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(
|
||||
pushPanel({
|
||||
name: panel_names.DETAIL_PANEL,
|
||||
panelInfo: {
|
||||
navigateToDetail({
|
||||
patnrId,
|
||||
prdtId,
|
||||
sourceMenu: SOURCE_MENUS.PLAYER_SHOP_NOW,
|
||||
additionalInfo: {
|
||||
showNm: playListInfo?.showNm,
|
||||
showId: playListInfo?.showId,
|
||||
liveFlag: playListInfo?.liveFlag,
|
||||
thumbnailUrl: playListInfo?.thumbnailUrl,
|
||||
liveReqFlag: panelInfo?.shptmBanrTpNm === 'LIVE' && 'Y',
|
||||
patnrId,
|
||||
prdtId,
|
||||
launchedFromPlayer: true,
|
||||
lastFocusedTargetId: currentSpotlightId, // 현재 포커스된 spotlightId 저장
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user