From a55bc49ef3bae147438551a8822df700896e0d8c Mon Sep 17 00:00:00 2001 From: dongyoungKo Date: Tue, 27 May 2025 15:42:53 +0900 Subject: [PATCH] =?UTF-8?q?youmaylike=20click=20=EB=A1=9C=EA=B7=B8=20?= =?UTF-8?q?=EC=88=98=EC=A7=91=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EB=88=84?= =?UTF-8?q?=EB=9D=BD=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/TItemCard/TItemCard.jsx | 6 +++ .../DetailPanel/YouMayLike/YouMayLike.jsx | 49 ++++++++----------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/com.twin.app.shoptime/src/components/TItemCard/TItemCard.jsx b/com.twin.app.shoptime/src/components/TItemCard/TItemCard.jsx index c0645cd3..fee95bbb 100644 --- a/com.twin.app.shoptime/src/components/TItemCard/TItemCard.jsx +++ b/com.twin.app.shoptime/src/components/TItemCard/TItemCard.jsx @@ -77,6 +77,9 @@ export default memo(function TItemCard({ categoryTitle, curationId, curationTitle, + nowProductId, + nowCategory, + nowProductTitle, ...rest }) { const dispatch = useDispatch(); @@ -126,6 +129,9 @@ export default memo(function TItemCard({ shelfTitle: shelfTitle, productId: productId, productTitle: productName, + nowProductId: nowProductId, + nowCategory: nowCategory, + nowProductTitle: nowProductTitle, partner: patnerName, brand: brandName, price: originalPrice, diff --git a/com.twin.app.shoptime/src/views/DetailPanel/YouMayLike/YouMayLike.jsx b/com.twin.app.shoptime/src/views/DetailPanel/YouMayLike/YouMayLike.jsx index b58fa9a7..9c1da13e 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/YouMayLike/YouMayLike.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/YouMayLike/YouMayLike.jsx @@ -30,7 +30,6 @@ import css from "./YouMayLike.module.less"; import { sendLogTotalRecommend } from "../../../actions/logActions"; import * as Config from "../../../utils/Config"; - const Container = SpotlightContainerDecorator( { enterTo: "default-element" }, "div" @@ -39,7 +38,6 @@ const Container = SpotlightContainerDecorator( const SpottableComponent = Spottable("div"); export default memo(function YouMayLike({ isUnable, - panelInfo, productInfo, setSelectedIndex, @@ -58,8 +56,6 @@ export default memo(function YouMayLike({ (state) => state.home.themeCurationDetailInfoData ); - - const cursorOpen = useRef(new Job((func) => func(), 1000)); const launchedFromPlayer = useMemo(() => { @@ -129,38 +125,25 @@ export default memo(function YouMayLike({ setExpanded((prev) => !prev); }, []); - const renderItem = useCallback( ({ index, ...rest }) => { - const { imgUrl, patnrId, prdtId, prdtNm, priceInfo, offerInfo, patncNm, brndNm, lgCatCd} = - youmaylikeData[index]; + const { + imgUrl, + patnrId, + prdtId, + prdtNm, + priceInfo, + offerInfo, + patncNm, + brndNm, + lgCatCd, + } = youmaylikeData[index]; const handleItemClick = () => { - console.log('priceInfo', priceInfo); - const splittedPriceInfo = priceInfo.split("|").map((item) => item.trim()); - const discountRate = splittedPriceInfo[4]; - const logParams = { - productId: patnrId, - productTitle: prdtNm, - category: lgCatCd, - nowProductId: productInfo?.prdtId, - nowProductTitle: productInfo?.prdtNm, - nowCategory: productInfo?.catNm, - discount: discountRate, - price: priceInfo, - partner: patncNm, - brand: brndNm, - contextName: Config.LOG_CONTEXT_NAME.YOUMAYLIKE, - messageId: Config.LOG_MESSAGE_ID.CONTENTCLICK - }; setExpanded(false); setSelectedIndex(0); dispatch(finishVideoPreview()); dispatch(popPanel(panel_names.DETAIL_PANEL)); - dispatch( - sendLogTotalRecommend(logParams) - ); - console.log(logParams); setContainerLastFocusedElement(null, ["indicator-GridListContainer"]); if (themeProductInfos && themeProductInfos.length > 0) { @@ -183,6 +166,16 @@ export default memo(function YouMayLike({