[foryou] api변경으로 인한 조건 수정
- foryou api 변경으로 인한 조건 수정.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import React, {
|
||||
useCallback,
|
||||
useEffect,
|
||||
useRef,
|
||||
useState,
|
||||
} from 'react';
|
||||
@@ -14,31 +13,26 @@ import {
|
||||
import Spotlight from '@enact/spotlight';
|
||||
import SpotlightContainerDecorator
|
||||
from '@enact/spotlight/SpotlightContainerDecorator';
|
||||
import { setContainerLastFocusedElement } from '@enact/spotlight/src/container';
|
||||
|
||||
import background
|
||||
from '../../../assets/images/JustForYouPanel/background_new.png';
|
||||
import { getJustForYouInfo } from '../../actions/forYouActions';
|
||||
import {
|
||||
popPanel,
|
||||
pushPanel,
|
||||
updatePanel,
|
||||
} from '../../actions/panelActions';
|
||||
import CustomImage from '../../components/CustomImage/CustomImage';
|
||||
import SectionTitle from '../../components/SectionTitle/SectionTitle';
|
||||
import TBody from '../../components/TBody/TBody';
|
||||
import TButton, { TYPES } from '../../components/TButton/TButton';
|
||||
import TItemCard, {
|
||||
import TItemCardNew, {
|
||||
removeDotAndColon,
|
||||
} from '../../components/TItemCard/TItemCard';
|
||||
import TItemCardNew from '../../components/TItemCard/TItemCard.new';
|
||||
} from '../../components/TItemCard/TItemCard.new';
|
||||
import TPanel from '../../components/TPanel/TPanel';
|
||||
import TVerticalPagenator
|
||||
from '../../components/TVerticalPagenator/TVerticalPagenator';
|
||||
import TVirtualGridList
|
||||
from '../../components/TVirtualGridList/TVirtualGridList';
|
||||
import { panel_names } from '../../utils/Config';
|
||||
import { $L } from '../../utils/helperMethods';
|
||||
import { SpotlightIds } from '../../utils/SpotlightIds';
|
||||
import THeaderCustom from '../DetailPanel/components/THeaderCustom';
|
||||
import css from './JustForYouTestPanel.module.less';
|
||||
@@ -76,7 +70,8 @@ const JustForYouTestPanel = ({ panelInfo, ...rest }) => {
|
||||
shelfInfos[0].productInfos?.length > 0
|
||||
) {
|
||||
// const firstProduct = shelfInfos[0].productInfos[0];
|
||||
// const target = `spotlightId-${shelfInfos[0].shelfId}-${removeDotAndColon(firstProduct.contentId).replaceAll(" ", "")}`;
|
||||
// const target = `spotlightId-${shelfInfos[0].shelfId}-${shelfInfos[0].shelfExpsOrd}-${removeDotAndColon(firstProduct.contentId)}`;
|
||||
// console.log("###target",target)
|
||||
Spotlight.focus("justForYouList_1");
|
||||
}
|
||||
}, [shelfInfos]);
|
||||
@@ -130,7 +125,7 @@ const JustForYouTestPanel = ({ panelInfo, ...rest }) => {
|
||||
productName={title}
|
||||
productId={contentId}
|
||||
onClick={handleItemClick}
|
||||
spotlightId={`spotlightId-${shelfId}-${shelfExpsOrd}-${removeDotAndColon(contentId).replaceAll(" ", "")}`}
|
||||
spotlightId={`spotlightId-${shelfId}-${shelfExpsOrd}-${removeDotAndColon(contentId)}`}
|
||||
{...rest}
|
||||
/>
|
||||
);
|
||||
@@ -168,7 +163,8 @@ const JustForYouTestPanel = ({ panelInfo, ...rest }) => {
|
||||
if (
|
||||
!shelf ||
|
||||
!shelf.productInfos ||
|
||||
shelf.productInfos.length === 0
|
||||
shelf.productInfos.length === 0 ||
|
||||
shelf.recommendTpCd !== "JUSTFORYOU"
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user