diff --git a/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx b/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx index 9305dbf4..fc6503d4 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx @@ -18,7 +18,7 @@ import Spottable from '@enact/spotlight/Spottable'; import { getContainerId } from '@enact/spotlight/src/container'; import { updateHomeInfo } from '../../../actions/homeActions'; -import { pushPanel } from '../../../actions/panelActions'; +import { pushPanel, popPanel } from '../../../actions/panelActions'; import { startVideoPlayer } from '../../../actions/playActions'; import SectionTitle from '../../../components/SectionTitle/SectionTitle'; import Tag from '../../../components/TItemCard/Tag'; @@ -69,6 +69,7 @@ const PopularShow = ({ const dispatch = useDispatch(); const { cursorVisible } = useSelector((state) => state.common.appStatus); + const panels = useSelector((state) => state.panels.panels); const topInfos = useSelector((state) => state.main.top20ShowData.topInfos); const recommendInfo = useSelector((state) => state.foryou?.recommendInfo?.recommendShow); @@ -124,6 +125,12 @@ const PopularShow = ({ const handleCardClick = useCallback( (patnrId, showId, catCd, showUrl) => () => { + const topPanel = panels[panels.length - 1]; + + if (topPanel?.name === panel_names.PLAYER_PANEL) { + dispatch(popPanel()); + } + dispatch( startVideoPlayer({ showId, @@ -135,7 +142,7 @@ const PopularShow = ({ }) ); }, - [dispatch] + [dispatch, panels] ); const handleMoreCardClick = useCallback(() => {