[PlayerPanel] featuredBrands videoItemClick y scroll

This commit is contained in:
고동영
2024-07-26 16:28:02 +09:00
parent ddfb373771
commit e2d8652622

View File

@@ -67,7 +67,7 @@ export default function FeaturedCreatorsProductList({
}, [scrollLeft, selectedHstNm, selectedPatnrId]);
const handleClick = useCallback(
(prdtId) => (e) => {
(prdtId, index) => (e) => {
const tItemCard = e.currentTarget;
const lastFocusedTarget = Spotlight.getCurrent();
@@ -98,6 +98,13 @@ export default function FeaturedCreatorsProductList({
);
}
let y =
index < 2
? 0
: index === 2
? scaleH(208)
: scaleH(index * 248 - 248 - 40);
dispatch(
startVideoPlayer({
modal: false,
@@ -106,6 +113,7 @@ export default function FeaturedCreatorsProductList({
showId,
shptmBanrTpNm: "VOD",
targetId: "spotlightId-" + prdtId,
y,
})
);
},
@@ -133,7 +141,7 @@ export default function FeaturedCreatorsProductList({
data-product-card={"featured-creators-product-card-" + contentsIndex}
imageAlt={prdtNm}
imageSource={prdtImgUrl}
onClick={handleClick(prdtId)}
onClick={handleClick(prdtId, index)}
onFocus={handleFocus}
offerInfo={offerInfo}
priceInfo={priceInfo}