[251120] fix: Before Launche HotPicksPanel remove PlayerPanel
🕐 커밋 시간: 2025. 11. 20. 15:12:55 📊 변경 통계: • 총 파일: 3개 • 추가: +32줄 • 삭제: -10줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/views/HomePanel/EventPopUpBanner/EventPopUpBanner.jsx ~ com.twin.app.shoptime/src/views/HomePanel/HomeBanner/RandomUnit.jsx ~ com.twin.app.shoptime/src/views/HomePanel/HomeBanner/RollingUnit.jsx 🔧 주요 변경 내용: • 소규모 기능 개선
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
|||||||
import { setEventPopClickInfo } from '../../../actions/eventActions';
|
import { setEventPopClickInfo } from '../../../actions/eventActions';
|
||||||
import { sendLogGNB, sendLogShopByMobile } from '../../../actions/logActions';
|
import { sendLogGNB, sendLogShopByMobile } from '../../../actions/logActions';
|
||||||
import { pushPanel, navigateFromEventPopup } from '../../../actions/panelActions';
|
import { pushPanel, navigateFromEventPopup } from '../../../actions/panelActions';
|
||||||
import { startVideoPlayer } from '../../../actions/playActions';
|
import { startVideoPlayer, finishVideoPreview } from '../../../actions/playActions';
|
||||||
import MobileSendPopUp from '../../../components/MobileSend/MobileSendPopUp';
|
import MobileSendPopUp from '../../../components/MobileSend/MobileSendPopUp';
|
||||||
import TPopUp from '../../../components/TPopUp/TPopUp';
|
import TPopUp from '../../../components/TPopUp/TPopUp';
|
||||||
import { launchMembershipApp } from '../../../lunaSend';
|
import { launchMembershipApp } from '../../../lunaSend';
|
||||||
@@ -34,6 +34,11 @@ export default function EventPopUpBanner() {
|
|||||||
const smsSuccess = useSelector((state) => state.appData.sendSms.retCode);
|
const smsSuccess = useSelector((state) => state.appData.sendSms.retCode);
|
||||||
const couponDownloadSuccess = useSelector((state) => state.coupon?.couponDownloadSuccess);
|
const couponDownloadSuccess = useSelector((state) => state.coupon?.couponDownloadSuccess);
|
||||||
|
|
||||||
|
const playerPanelInfo = useSelector((state) => {
|
||||||
|
const playerPanel = state.panels.panels.find((p) => p.name === panel_names.PLAYER_PANEL);
|
||||||
|
return playerPanel?.panelInfo;
|
||||||
|
});
|
||||||
|
|
||||||
const timerRef = useRef();
|
const timerRef = useRef();
|
||||||
const shopByMobileLogRef = useRef(null);
|
const shopByMobileLogRef = useRef(null);
|
||||||
const defaultFocus = useSelector((state) => state.home.defaultFocus);
|
const defaultFocus = useSelector((state) => state.home.defaultFocus);
|
||||||
@@ -65,6 +70,9 @@ export default function EventPopUpBanner() {
|
|||||||
case 'EVT00104': // curation + prize
|
case 'EVT00104': // curation + prize
|
||||||
case 'EVT00107': {
|
case 'EVT00107': {
|
||||||
// curation + billing coupon
|
// curation + billing coupon
|
||||||
|
if (playerPanelInfo?.modal) {
|
||||||
|
dispatch(finishVideoPreview());
|
||||||
|
}
|
||||||
dispatch(setHidePopup());
|
dispatch(setHidePopup());
|
||||||
dispatch(
|
dispatch(
|
||||||
pushPanel({
|
pushPanel({
|
||||||
@@ -198,13 +206,18 @@ export default function EventPopUpBanner() {
|
|||||||
dispatch(pushPanel({ name: panel_names.TRENDING_NOW_PANEL }));
|
dispatch(pushPanel({ name: panel_names.TRENDING_NOW_PANEL }));
|
||||||
break;
|
break;
|
||||||
case 'EVT00204':
|
case 'EVT00204':
|
||||||
pushPanel({
|
if (playerPanelInfo?.modal) {
|
||||||
name: panel_names.HOT_PICKS_PANEL,
|
dispatch(finishVideoPreview());
|
||||||
panelInfo: {
|
}
|
||||||
curationId: eventPopData.shptmLnkInfo?.lnkCurationId,
|
dispatch(
|
||||||
patnrId: eventPopData.shptmLnkInfo?.lnkPatnrId,
|
pushPanel({
|
||||||
},
|
name: panel_names.HOT_PICKS_PANEL,
|
||||||
});
|
panelInfo: {
|
||||||
|
curationId: eventPopData.shptmLnkInfo?.lnkCurationId,
|
||||||
|
patnrId: eventPopData.shptmLnkInfo?.lnkPatnrId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
case 'EVT00205':
|
case 'EVT00205':
|
||||||
dispatch(
|
dispatch(
|
||||||
|
|||||||
@@ -486,7 +486,8 @@ export default function RandomUnit({
|
|||||||
let action = linkType === 'DSP00507' ? startVideoPlayer : pushPanel;
|
let action = linkType === 'DSP00507' ? startVideoPlayer : pushPanel;
|
||||||
|
|
||||||
const isNavigatingToDetail = linkInfo.name === panel_names.DETAIL_PANEL;
|
const isNavigatingToDetail = linkInfo.name === panel_names.DETAIL_PANEL;
|
||||||
if (isNavigatingToDetail && playerPanelInfo?.modal !== false) {
|
const isNavigatingToHotPicks = linkInfo.name === panel_names.HOT_PICKS_PANEL;
|
||||||
|
if ((isNavigatingToDetail || isNavigatingToHotPicks) && playerPanelInfo?.modal !== false) {
|
||||||
finishAndUnlock();
|
finishAndUnlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ import {
|
|||||||
sendLogTotalRecommend,
|
sendLogTotalRecommend,
|
||||||
} from '../../../actions/logActions';
|
} from '../../../actions/logActions';
|
||||||
import { pushPanel } from '../../../actions/panelActions';
|
import { pushPanel } from '../../../actions/panelActions';
|
||||||
import { startVideoPlayer } from '../../../actions/playActions';
|
import { startVideoPlayer, finishVideoPreview } from '../../../actions/playActions';
|
||||||
import CustomImage from '../../../components/CustomImage/CustomImage';
|
import CustomImage from '../../../components/CustomImage/CustomImage';
|
||||||
import usePriceInfo from '../../../hooks/usePriceInfo';
|
import usePriceInfo from '../../../hooks/usePriceInfo';
|
||||||
import {
|
import {
|
||||||
@@ -116,6 +116,11 @@ export default function RollingUnit({
|
|||||||
|
|
||||||
const { userNumber } = useSelector((state) => state.common.appStatus.loginUserData);
|
const { userNumber } = useSelector((state) => state.common.appStatus.loginUserData);
|
||||||
|
|
||||||
|
const playerPanelInfo = useSelector((state) => {
|
||||||
|
const playerPanel = state.panels.panels.find((p) => p.name === panel_names.PLAYER_PANEL);
|
||||||
|
return playerPanel?.panelInfo;
|
||||||
|
});
|
||||||
|
|
||||||
const bannerId = `banner-${bannerData.banrLctnNo}`;
|
const bannerId = `banner-${bannerData.banrLctnNo}`;
|
||||||
const savedIndex = useSelector((state) => state.home.bannerIndices[bannerId]);
|
const savedIndex = useSelector((state) => state.home.bannerIndices[bannerId]);
|
||||||
|
|
||||||
@@ -408,6 +413,9 @@ export default function RollingUnit({
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LINK_TYPES.HOT_PICKS:
|
case LINK_TYPES.HOT_PICKS:
|
||||||
|
if (playerPanelInfo?.modal) {
|
||||||
|
dispatch(finishVideoPreview());
|
||||||
|
}
|
||||||
handlePushPanel(
|
handlePushPanel(
|
||||||
panel_names.HOT_PICKS_PANEL,
|
panel_names.HOT_PICKS_PANEL,
|
||||||
createPanelInfo(currentData)
|
createPanelInfo(currentData)
|
||||||
|
|||||||
Reference in New Issue
Block a user