[251019] fix: YouMayLikeContents focus policy update

🕐 커밋 시간: 2025. 10. 19. 17:11:30

📊 변경 통계:
  • 총 파일: 2개

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/ShopNowContents.jsx
  ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/YouMayLikeContents.jsx

🔧 함수 변경 내용:
  📄 com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/ShopNowContents.jsx (javascript):
    🔄 Modified: SpotlightContainerDecorator()
This commit is contained in:
2025-10-19 17:11:31 +09:00
parent b8d1face8f
commit 231cbe163a
2 changed files with 33 additions and 24 deletions

View File

@@ -139,6 +139,9 @@ export default function ShopNowContents({
const isYouMayLikeStart = shopNowInfo && index === shopNowInfo.length;
const handleItemClick = () => {
// DetailPanel push 전에 VideoPlayer 오버레이 숨김
dispatch(hidePlayerOverlays());
dispatch(
pushPanel({
name: panel_names.DETAIL_PANEL,

View File

@@ -1,27 +1,14 @@
import React, {
useCallback,
useEffect,
useMemo,
useState,
} from 'react';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import {
useDispatch,
useSelector,
} from 'react-redux';
import { useDispatch, useSelector } from 'react-redux';
import { pushPanel } from '../../../../actions/panelActions';
import TItemCard, { TYPES } from '../../../../components/TItemCard/TItemCard';
import TVirtualGridList
from '../../../../components/TVirtualGridList/TVirtualGridList';
import {
LOG_MENU,
panel_names,
} from '../../../../utils/Config';
import {
$L,
scaleH,
} from '../../../../utils/helperMethods';
import TVirtualGridList from '../../../../components/TVirtualGridList/TVirtualGridList';
import { LOG_MENU, panel_names, LOG_CONTEXT_NAME, LOG_MESSAGE_ID } from '../../../../utils/Config';
import { $L, scaleH } from '../../../../utils/helperMethods';
import { hidePlayerOverlays } from '../../../../actions/videoPlayActions';
import { sendLogTotalRecommend } from '../../../../actions/logActions';
import css1 from './YouMayLikeContents.module.less';
import cssV2 from './YouMayLikeContents.v2.module.less';
@@ -30,7 +17,7 @@ export default function YouMayLikeContents({
handleItemFocus,
playListInfo,
version = 1,
direction = "vertical",
direction = 'vertical',
}) {
const css = version === 2 ? cssV2 : css1;
const dispatch = useDispatch();
@@ -60,10 +47,27 @@ export default function YouMayLikeContents({
const renderItem = useCallback(
({ index, ...rest }) => {
const { imgUrl, patnrId, prdtId, prdtNm, priceInfo, offerInfo } =
const { imgUrl, patnrId, prdtId, prdtNm, priceInfo, offerInfo, catNm, brndNm, patncNm } =
youmaylikeInfos[index];
const handleItemClick = () => {
const params = {
tabTitle: 'You May Also Like',
productId: prdtId,
productTitle: prdtNm,
partner: patncNm,
brand: brndNm,
price: priceInfo,
showType: 'YOU_MAY_LIKE',
category: catNm,
contextName: LOG_CONTEXT_NAME.SHOW,
messageId: LOG_MESSAGE_ID.CONTENTCLICK,
};
dispatch(sendLogTotalRecommend(params));
// DetailPanel push 전에 VideoPlayer 오버레이 숨김
dispatch(hidePlayerOverlays());
dispatch(
pushPanel({
name: panel_names.DETAIL_PANEL,
@@ -71,6 +75,7 @@ export default function YouMayLikeContents({
showNm: playListInfo?.showNm,
showId: playListInfo?.showId,
liveFlag: playListInfo?.liveFlag,
thumbnailUrl: playListInfo?.thumbnailUrl,
patnrId,
prdtId,
launchedFromPlayer: true,
@@ -88,6 +93,7 @@ export default function YouMayLikeContents({
priceInfo={priceInfo}
offerInfo={offerInfo}
productName={prdtNm}
productId={prdtId}
onClick={handleItemClick}
onFocus={handleFocus()}
type={TYPES.horizontal}
@@ -102,10 +108,10 @@ export default function YouMayLikeContents({
<>
{youmaylikeInfos && youmaylikeInfos.length > 0 && (
<>
<div className={css.title}>{$L("You may also like")}</div>
<div className={css.title}>{$L('You may also like')}</div>
<div className={css.line}></div>
<div className={version === 2 ? css.container : ""}>
<div className={version === 2 ? css.container : ''}>
<TVirtualGridList
style={version === 2 ? undefined : gridStyle}
dataSize={youmaylikeInfos.length}