From 15949c7030a71d1b54c3c6b952f824853d4e0d38 Mon Sep 17 00:00:00 2001 From: dongyoungKo Date: Wed, 11 Jun 2025 18:32:34 +0900 Subject: [PATCH] =?UTF-8?q?[HLM=20SHOPTIME-5511]=20=ED=95=91=ED=81=AC?= =?UTF-8?q?=ED=90=81=20featured=20brand=20page=20=EB=82=B4=20vod=20?= =?UTF-8?q?=ED=8E=B8=EC=84=B1=20=EC=9A=94=EC=B2=AD=20=EA=B1=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [수정사항] featuredBrandPanel LiveChannels에서 Live 방송이 아닌 VOD 채널을 편성 기존에는 startVideoPlayer Action을 호출할때 videoType을 LIVE 타입으로 하드코딩되어있는 부분을 수정 핑크퐁에서만 SectionTitle 부분에 LIVE CHANNELS 텍스트가 변경되므로 patncNm으로 분기처리 --- .../FeaturedBrandsPanel.jsx | 5 ++++ .../LiveChannels/LiveChannels.jsx | 26 +++++++++++++++---- .../LiveChannelsVerticalContents.jsx | 6 +++-- .../LiveVideoCard/LiveVideoCard.jsx | 20 +++++++------- .../UpComing/UpComingList/UpComingList.jsx | 2 +- .../MyPagePanel/MyPageSub/Support/Support.jsx | 23 +++++++--------- 6 files changed, 51 insertions(+), 31 deletions(-) diff --git a/com.twin.app.shoptime/src/views/FeaturedBrandsPanel/FeaturedBrandsPanel.jsx b/com.twin.app.shoptime/src/views/FeaturedBrandsPanel/FeaturedBrandsPanel.jsx index 83227be3..77d64b80 100644 --- a/com.twin.app.shoptime/src/views/FeaturedBrandsPanel/FeaturedBrandsPanel.jsx +++ b/com.twin.app.shoptime/src/views/FeaturedBrandsPanel/FeaturedBrandsPanel.jsx @@ -108,6 +108,10 @@ const hasTemplateCodeWithValue = (array, value) => array?.some((obj) => obj?.shptmBrndOptTpCd === value) ?? false; const shouldRenderComponent = (data) => { + if (data === null) { + return; + } + return ( (Array.isArray(data) && data.length > 0) || (typeof data === "object" && Object.keys(data).length > 0) @@ -405,6 +409,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => { ); const renderPageItem = useCallback(() => { + console.log("#brandChannelCnt", brandChannelCnt); return ( <> {sortedBrandLayoutInfo.map((el, idx) => { diff --git a/com.twin.app.shoptime/src/views/FeaturedBrandsPanel/LiveChannels/LiveChannels.jsx b/com.twin.app.shoptime/src/views/FeaturedBrandsPanel/LiveChannels/LiveChannels.jsx index 62c149a4..bb63ca7e 100644 --- a/com.twin.app.shoptime/src/views/FeaturedBrandsPanel/LiveChannels/LiveChannels.jsx +++ b/com.twin.app.shoptime/src/views/FeaturedBrandsPanel/LiveChannels/LiveChannels.jsx @@ -1,4 +1,11 @@ -import React, { memo, useCallback, useEffect, useRef, useState } from "react"; +import React, { + memo, + useCallback, + useEffect, + useMemo, + useRef, + useState, +} from "react"; import { useDispatch, useSelector } from "react-redux"; @@ -83,6 +90,14 @@ const LiveChannels = ({ selectedPatnrId, ]); + const liveChannelsTitle = useMemo(() => { + if (brandChanInfo[0]?.patncNm === "Pinkfong") { + return "Subscription"; + } + + return $L(STRING_CONF.LIVE_CHANNELS); + }, [brandChanInfo]); + const _handleItemFocus = useCallback(() => { if (handleItemFocus) handleItemFocus(spotlightId, shelfOrder); @@ -120,7 +135,7 @@ const LiveChannels = ({ > {brandChanInfo && brandChanInfo.length > 0 && ( @@ -136,7 +151,7 @@ const LiveChannels = ({ .slice(0, 1) .map( (brandChanInfoItem, contentsIndex) => - brandChanInfoItem.liveYn === "N" && ( + brandChanInfoItem.liveYn === "Y" && ( )} - {brandChannelCnt === 1 && ( + {Number(brandChannelCnt) === 1 && ( <> {brandChanInfo .slice(0, 1) .map( (brandChanInfoItem, contentsIndex) => - brandChanInfoItem.liveYn === "Y" && ( + (brandChanInfoItem.liveYn === "Y" || + brandChanInfoItem.patncNm === "Pinkfong") && ( {brandProductInfo && brandProductInfo.length > 0 ? ( diff --git a/com.twin.app.shoptime/src/views/FeaturedBrandsPanel/LiveChannels/LiveChannelsVerticalContents/LiveVideoCard/LiveVideoCard.jsx b/com.twin.app.shoptime/src/views/FeaturedBrandsPanel/LiveChannels/LiveChannelsVerticalContents/LiveVideoCard/LiveVideoCard.jsx index 8b3d2ae2..46c0f899 100644 --- a/com.twin.app.shoptime/src/views/FeaturedBrandsPanel/LiveChannels/LiveChannelsVerticalContents/LiveVideoCard/LiveVideoCard.jsx +++ b/com.twin.app.shoptime/src/views/FeaturedBrandsPanel/LiveChannels/LiveChannelsVerticalContents/LiveVideoCard/LiveVideoCard.jsx @@ -19,6 +19,7 @@ export default memo(function LiveVideoCard({ onClick, onFocus, onLoad, + liveYn, ...rest }) { const [imageLoaded, setIsImageLoaded] = useState(false); @@ -76,15 +77,16 @@ export default memo(function LiveVideoCard({ onLoad={_onLoad} /> - -
- -

{showNm.replace(//gi, " ")}

- -
+ {liveYn === "Y" && ( +
+ +

{showNm.replace(//gi, " ")}

+ +
+ )} {imageLoaded &&
} diff --git a/com.twin.app.shoptime/src/views/FeaturedBrandsPanel/UpComing/UpComingList/UpComingList.jsx b/com.twin.app.shoptime/src/views/FeaturedBrandsPanel/UpComing/UpComingList/UpComingList.jsx index 2908aba5..5c9e8587 100644 --- a/com.twin.app.shoptime/src/views/FeaturedBrandsPanel/UpComing/UpComingList/UpComingList.jsx +++ b/com.twin.app.shoptime/src/views/FeaturedBrandsPanel/UpComing/UpComingList/UpComingList.jsx @@ -179,7 +179,7 @@ export default memo(function UpComingList({ brandLiveChannelUpcoming[index]; const selectedAlertShow = alertShows // - .find((show) => show.showId === showId && show.strtDt === strtDt); + .find((show) => show?.showId === showId && show?.strtDt === strtDt); const alamDispFlag = selectedAlertShow?.alamDispFlag; diff --git a/com.twin.app.shoptime/src/views/MyPagePanel/MyPageSub/Support/Support.jsx b/com.twin.app.shoptime/src/views/MyPagePanel/MyPageSub/Support/Support.jsx index 1283e920..5b928f0f 100644 --- a/com.twin.app.shoptime/src/views/MyPagePanel/MyPageSub/Support/Support.jsx +++ b/com.twin.app.shoptime/src/views/MyPagePanel/MyPageSub/Support/Support.jsx @@ -1,18 +1,14 @@ -import React, { - useCallback, - useEffect, - useState, -} from 'react'; +import React, { useCallback, useEffect, useState } from "react"; -import Spotlight from '@enact/spotlight'; +import Spotlight from "@enact/spotlight"; -import TBody from '../../../../components/TBody/TBody'; -import TButtonTab from '../../../../components/TButtonTab/TButtonTab'; -import THeader from '../../../../components/THeader/THeader'; -import { $L } from '../../../../utils/helperMethods'; -import ContactContents from './ContactContents/ContactContents'; -import ListContents from './ListContents/ListContents'; -import css from './Support.module.less'; +import TBody from "../../../../components/TBody/TBody"; +import TButtonTab from "../../../../components/TButtonTab/TButtonTab"; +import THeader from "../../../../components/THeader/THeader"; +import { $L } from "../../../../utils/helperMethods"; +import ContactContents from "./ContactContents/ContactContents"; +import ListContents from "./ListContents/ListContents"; +import css from "./Support.module.less"; export default function Support({ title, cbScrollTo }) { const [selectedTab, setSelectedTab] = useState(0); @@ -20,7 +16,6 @@ export default function Support({ title, cbScrollTo }) { const tabList = [$L("FAQ"), $L("Contact"), $L("Notice")]; const handleItemClick = useCallback( ({ index, ...rest }) => { - console.log("#TButtonTab onItemClick", index, rest); setSelectedTab(index); }, [selectedTab]