[Log] GNB 화면 전환 로그 중간 commit

This commit is contained in:
younghoon100.park
2024-05-22 19:20:10 +09:00
parent 435c106ac4
commit 6ea75dc8a8
13 changed files with 198 additions and 73 deletions

View File

@@ -45,6 +45,10 @@ export const getUrlByLogTpNo = (logTpNo) => {
case LOG_TP_NO.MY_PAGE.ALERT_FLAG:
return URLS.LOG_MY_PAGE_ALERT_FLAG;
// IF-LGSP-LOG-011 / My Page Delete 버튼 클릭 이력
case LOG_TP_NO.MY_PAGE.MY_DELETE:
return URLS.LOG_MY_PAGE_MY_DELETE;
// IF-LGSP-LOG-013 / 검색 이력
case LOG_TP_NO.SEACH:
return URLS.LOG_SEARCH;
@@ -71,7 +75,7 @@ export const postLog = (params) => (dispatch, getState) => {
const onSuccess = (response) => {
console.log(
`pyh postLog onSuccess, ${logTpNo}`,
`pyh postLog onSuccess ${logTpNo}`,
JSON.parse(response.config.data)
);
};

View File

@@ -3,10 +3,19 @@ import { LOG_MENU, LOG_TP_NO, panel_names } from "../utils/Config";
import { postLog } from "../actions/logActions";
import { useCallback, useMemo } from "react";
import { formatGMTString } from "../utils/helperMethods";
import usePrevious from "./usePrevious";
export default function useLogService() {
const dispatch = useDispatch();
const entryMenu = useSelector((state) => state.common.menu.entryMenu);
const nowMenu = useSelector((state) => state.common.menu.nowMenu);
const menuMovSno = useSelector((state) => state.common.menu.menuMovSno);
const entryMenuRef = usePrevious(entryMenu);
const menuMovSnoRef = usePrevious(menuMovSno);
const nowMenuRef = usePrevious(nowMenu);
const { panels } = useSelector((state) => state.panels);
const nonPlayerPanels = useMemo(
@@ -113,26 +122,22 @@ export default function useLogService() {
(params) => {
const { logTpNo } = params;
const menuMap = {
[LOG_TP_NO.CURATION.HOT_PICKS]: LOG_MENU.HOT_PICKS,
[LOG_TP_NO.CURATION.ON_SALE]: LOG_MENU.ON_SALE,
[LOG_TP_NO.CURATION.HOME]: LOG_MENU.HOME,
[LOG_TP_NO.CURATION.CATEGORY]: LOG_MENU.CATEGORY,
};
const menu = menuMap[logTpNo] || "";
if (!logTpNo) {
console.error("sendLogCuration invalid params", params);
return;
}
const newParams = {
cnttTpNm: params.cnttTpNm ?? "",
curationId: params.curationId ?? "",
curationNm: params.curationNm ?? "",
entryMenu: params.entryMenu ?? menu,
entryMenu: entryMenuRef.current,
expsOrd: params.expsOrd ?? "",
lgCatCd: params.lgCatCd ?? "",
lgCatNm: params.lgCatNm ?? "",
logTpNo: params.logTpNo ?? "",
linkTpCd: params.linkTpCd ?? "",
nowMenu: params.nowMenu ?? menu,
nowMenu: nowMenuRef.current,
patncNm: params.patncNm ?? "",
patnrId: params.patnrId ?? "",
sortTpNm: params.sortTpNm ?? "",
@@ -140,7 +145,7 @@ export default function useLogService() {
dispatch(postLog(newParams));
},
[dispatch]
[dispatch, entryMenuRef, nowMenuRef]
);
/**
@@ -159,21 +164,29 @@ export default function useLogService() {
* (M) outDt 진출 시간
*/
const sendLogGNB = useCallback(
(params) => {
const { logTpNo } = params;
(nowMenu) => {
if (!nowMenu) {
console.error("sendLogGNB invalid params", nowMenu);
return;
}
if (nowMenu === nowMenuRef.current) {
return;
}
const newParams = {
entryMenu: params.entryMenu ?? "",
inDt: params?.inDt ?? "",
logTpNo,
menuMovSno: params.menuMovSno ?? "",
nowMenu: params.nowMenu ?? "",
outDt: params?.outDt ?? "",
entryMenu: nowMenuRef.current, // previous nowMenu
inDt: formatGMTString(new Date()),
logTpNo: LOG_TP_NO.GNB,
menuMovSno: menuMovSnoRef.current,
nowMenu: nowMenu,
outDt: "",
};
dispatch(postLog(newParams));
dispatch({ type: "SET_GNB_MENU", payload: nowMenu });
},
[dispatch]
[dispatch, entryMenuRef, menuMovSnoRef, nowMenuRef]
);
/**
@@ -290,23 +303,31 @@ export default function useLogService() {
(params) => {
const { logTpNo } = params;
const menuMap = {
[LOG_TP_NO.PARTNERS]: LOG_MENU.FEATURED_BRANDS,
};
// const menuMap = {
// [LOG_TP_NO.PARTNERS]: LOG_MENU.FEATURED_BRANDS,
// };
const menu = menuMap[logTpNo] || "";
// const menu = menuMap[logTpNo] || "";
// const newParams = {
// entryMenu: params.entryMenu ?? menu,
// logTpNo: params.logTpNo ?? "",
// nowMenu: params.nowMenu ?? menu,
// patncNm: params.patncNm ?? "",
// patnrId: params.patnrId ?? "",
// };
const newParams = {
entryMenu: params.entryMenu ?? menu,
logTpNo: params.logTpNo ?? "",
nowMenu: params.nowMenu ?? menu,
entryMenu: entryMenuRef.current,
logTpNo,
nowMenu: nowMenuRef.current,
patncNm: params.patncNm ?? "",
patnrId: params.patnrId ?? "",
};
dispatch(postLog(newParams));
},
[dispatch]
[dispatch, entryMenuRef, nowMenuRef]
);
/**
@@ -320,12 +341,12 @@ export default function useLogService() {
*
* (M) nowMenu 현재 메뉴
*/
const sendLogMyPageAlert = useCallback(
const sendLogMyPageAlertFlag = useCallback(
(params) => {
const { logTpNo } = params;
const menuMap = {
[LOG_TP_NO.MY_PAGE.ALERT_FLAG]: LOG_MENU.MY_PAGE,
[LOG_TP_NO.MY_PAGE.ALERT_FLAG]: LOG_MENU.MY_PAGE_REMINDERS,
};
const menu = menuMap[logTpNo] || "";
@@ -341,6 +362,32 @@ export default function useLogService() {
[dispatch]
);
/**
* IF-LGSP-LOG-011 / My Page Delete 버튼 클릭 이력
*
* (M) cnt 삭제 개수
*
* (M) entryMenu 진입 메뉴
*
* (M) logTpNo 로그 타입 넘버
*
* (M) nowMenu 현재 메뉴
*/
const sendLogMyPageMyDelete = useCallback(
(params) => {
const { logTpNo } = params;
// mypage > Recently Viewed, Favorites, Reminders
const newParams = {
...params,
};
dispatch(postLog(newParams));
},
[dispatch]
);
/**
* IF-LGSP-LOG-013 / 검색 이력
*
@@ -416,18 +463,19 @@ export default function useLogService() {
(params) => {
const { logTpNo, showId, showNm } = params;
const entryMenu = LOG_MENU.SEARCH;
const nowMenu = showId && showNm ? LOG_MENU.PLAYER : LOG_MENU.DETAIL;
// pyh Todo, edit entryMenu and nowMenu
// const entryMenu = LOG_MENU.SEARCH;
// const nowMenu = showId && showNm ? LOG_MENU.PLAYER : LOG_MENU.DETAIL;
const newParams = {
curationId: params?.curationId ?? "",
curationNm: params?.curationNm ?? "",
dcAfPrice: params?.dcAfPrice ?? "",
entryMenu,
entryMenu: "",
keyword: params?.keyword ?? "",
lgCatNm: params?.lgCatNm ?? "",
logTpNo,
nowMenu,
nowMenu: "",
patncNm: params?.patncNm ?? "",
patnrId: params?.patnrId ?? "",
prdtId: params?.prdtId ?? "",
@@ -511,7 +559,7 @@ export default function useLogService() {
const newParams = {
entryMenu: LOG_MENU.APP,
logTpNo,
nowMenu: LOG_MENU.INTRO_TERMS,
nowMenu: LOG_MENU.TERMS_CONDITIONS,
};
dispatch(postLog(newParams));
@@ -524,7 +572,8 @@ export default function useLogService() {
sendLogCuration,
sendLogGNB,
sendLogShopByMobile,
sendLogMyPageAlert,
sendLogMyPageAlertFlag,
sendLogMyPageMyDelete,
sendLogSearch,
sendLogSearchClick,
sendLogPartners,

View File

@@ -1,6 +1,7 @@
import { useCallback, useEffect, useRef } from "react";
import { Job } from "@enact/core/util";
import { scaleH } from "../utils/helperMethods";
export default function useScrollTopByDistance() {
const jobRef = useRef(new Job((func) => func(), 0));
@@ -22,7 +23,7 @@ export default function useScrollTopByDistance() {
const markerRect = marker.getBoundingClientRect();
const targetRect = target.getBoundingClientRect();
const distance = targetRect.top - markerRect.top - gap;
const distance = targetRect.top - markerRect.top - scaleH(gap);
jobRef.current.start(() => scrollTop({ y: distance }));
} catch (error) {

View File

@@ -1,4 +1,4 @@
import { types } from '../actions/actionTypes';
import { types } from "../actions/actionTypes";
const initialState = {
appStatus: {
@@ -41,6 +41,12 @@ const initialState = {
_languageKeyId: "languageCode",
testRes: "",
check: "",
menu: {
entryMenu: "",
nowMenu: "App", // pyh todo, app 진입시 설정
menuMovSno: "1",
},
};
export const commonReducer = (state = initialState, action) => {
@@ -143,6 +149,7 @@ export const commonReducer = (state = initialState, action) => {
return state;
}
}
case "loadingComplete": {
return {
...state,
@@ -150,6 +157,18 @@ export const commonReducer = (state = initialState, action) => {
};
}
case "SET_GNB_MENU": {
return {
...state,
menu: {
...state.menu,
entryMenu: state.menu.nowMenu,
nowMenu: action.payload,
menuMovSno: `${Number(...state.menu.menuMovSno) + 1}`,
},
};
}
default:
return state;
}

View File

@@ -138,14 +138,12 @@ export const LOG_MENU = {
POP_UP: "Pop Up",
TERMS_CONDITIONS: "Terms&Conditions",
HOME: "Home",
HOME_TOP: "Home/Top",
HOME_CATEGORY: "Home/Category",
HOME_ON_SALE: "Home/On Sale",
HOME_POPULAR_SHOWS: "Home/Popular Shows",
HOME_BEST_SELLER: "Home/Best Sellers",
TRENDING_NOW: "Trending Now",
TRENDING_NOW_POPULAR_SHOWS: "Trending Now/Popular Shows",
TRENDING_NOW_BEST_SELLER: "Trending Now/Best Sellers",
@@ -153,15 +151,14 @@ export const LOG_MENU = {
ON_SALE: "On Sale",
SEARCH: "Search",
SEARCH: "Search/Search",
SEARCH_RESULT: "Search/Search Result",
SEARCH_BEST_SELLER: "Search/Best Sellers",
CATEGORY: "Category",
CATEGORY_POPULAR_SHOWS: "Category/Popular Shows",
CATEGORY_BEST_SELLER: "Category/Best Sellers",
FEATURED_BRANDS: "Featured Brands",
FEATURED_BRANDS_QUICK_MENU: "Featured Brands/Quick Menu",
FEATURED_BRANDS_LIVE_CHANNELS: "Featured Brands/Live Channels",
FEATURED_BRANDS_UPCOMING: "Featured Brands/Upcoming",
FEATURED_BRANDS_TODAYS_DEALS: 'Featured Brands/Today"s Deals',
@@ -172,7 +169,6 @@ export const LOG_MENU = {
FEATURED_BRANDS_CATEGORY: "Featured Brands/Category",
FEATURED_BRANDS_SHOWROOM: "Featured Brands/Showroom",
MY_PAGE: "My Page",
MY_PAGE_MY_INFO: "My Page/My Info",
MY_PAGE_MY_ORDERS: "My Page/My Orders",
MY_PAGE_FAVORITES: "My Page/Favorites",
@@ -184,22 +180,16 @@ export const LOG_MENU = {
THEME_PAGE: "Theme Page",
DETAIL_PAGE: "Detail Page",
DETAIL_PAGE_BILLING_PRODUCT_DETAIL: "Detail Page/Billing Product Detail",
DETAIL_PAGE_PRODUCT_DETAIL: "Detail Page/Product Detail",
DETAIL_PAGE_TRAVEL_THEME_DETAIL: "Detail Page/Travel Theme Detail",
DETAIL_PAGE_GROUP_DETAIL: "Detail Page/Group Detail",
FULL: "Full",
FULL_SHOP_NOW: "Full/Shop Now",
FULL_YOU_MAY_LIKE: "Full/You May Like",
FULL_LIVE_CHANNELS: "Full/Live Channels",
FULL_FEATURED_SHOWS: "Full/Featured Shows",
CART: "Cart",
CART_BEST_SELLER: "Cart/Best Sellers",
CHECKOUT: "Checkout",
CHECKOUT_PIN_CODE: "Checkout/PIN Code",
CHECKOUT_ORDER_COMPLETE: "Checkout/Order Complete",
};

View File

@@ -315,7 +315,6 @@ export const isChildFullyShowing = (parentNode, childNode) => {
return true;
}
} catch (e) {
console.error("pyh catch true", e);
return true;
}

View File

@@ -55,6 +55,8 @@ import TodaysDeals from "./TodaysDeals/TodaysDeals";
import UpComing from "./UpComing/UpComing";
import { setMainLiveUpcomingAlarm } from "../../actions/mainActions";
import useLogService from "../../hooks/useLogService";
const TEMPLATE_CODE_CONF = {
LIVE_CHANNELS: "BRD00101",
UP_COMING: "BRD00102",
@@ -138,6 +140,8 @@ const getMessageByPopupType = (type) => {
};
export default function FeaturedBrandsPanel() {
const { sendLogGNB } = useLogService();
const { getScrollTo: getScrollToBody, scrollTop: scrollTopBody } =
useScrollTo();
@@ -263,6 +267,7 @@ export default function FeaturedBrandsPanel() {
const forceUpdateJob = useRef(new Job(() => forceUpdate({}), 300));
const initialFocusTimeoutJob = useRef(new Job((func) => func(), 600));
const alamTimer = useRef(null);
const isLoading = useMemo(
@@ -631,8 +636,13 @@ export default function FeaturedBrandsPanel() {
dispatch(setHidePopup());
}, [dispatch]);
const handleItemFocus = useCallback(
(nowMenu) => sendLogGNB(nowMenu),
[sendLogGNB]
);
return (
<TPanel className={css.tPanel}>
<TPanel className={css.tPanel} id="tPanel">
<TBody
className={css.tBody}
cbScrollTo={getScrollToBody}
@@ -666,6 +676,7 @@ export default function FeaturedBrandsPanel() {
<LiveChannels
brandChanInfo={brandChanInfo}
brandChannelCnt={brandChannelCnt}
handleItemFocus={handleItemFocus}
order={getOrderByValue(
brandLayoutInfo,
TEMPLATE_CODE_CONF.LIVE_CHANNELS
@@ -682,6 +693,7 @@ export default function FeaturedBrandsPanel() {
shouldRenderComponent(brandLiveChannelUpcoming) && (
<UpComing
brandLiveChannelUpcoming={brandLiveChannelUpcoming}
handleItemFocus={handleItemFocus}
order={getOrderByValue(
brandLayoutInfo,
TEMPLATE_CODE_CONF.UP_COMING

View File

@@ -1,4 +1,4 @@
import React, { memo, useEffect, useMemo, useState } from "react";
import React, { memo, useCallback, useEffect, useMemo, useState } from "react";
import SectionTitle from "../../../components/SectionTitle/SectionTitle";
import { $L } from "../../../utils/helperMethods";
@@ -9,6 +9,7 @@ import LiveChannelsVerticalContents from "./LiveChannelsVerticalContents/LiveCha
import NoLiveContents from "./NoLiveContents/NoLiveContents";
import { useDispatch } from "react-redux";
import { getBrandChanInfo } from "../../../actions/brandActions";
import { LOG_MENU } from "../../../utils/Config";
const STRING_CONF = {
LIVE_CHANNELS: $L("LIVE CHANNELS"),
@@ -17,9 +18,10 @@ const STRING_CONF = {
export default memo(function LiveChannels({
brandChanInfo,
brandChannelCnt,
handleItemFocus,
order,
scrollTopBody,
selectedPatnrId,
order,
}) {
const dispatch = useDispatch();
@@ -51,11 +53,17 @@ export default memo(function LiveChannels({
return () => clearInterval(interval);
}, [brandChannelCnt, dispatch, isVideoErrorOccurred, selectedPatnrId]);
const _handleItemFocus = useCallback(() => {
if (handleItemFocus) {
handleItemFocus(LOG_MENU.FEATURED_BRANDS_LIVE_CHANNELS);
}
}, [handleItemFocus]);
return (
<div className={css.container} style={orderStyle}>
<SectionTitle
title={STRING_CONF.LIVE_CHANNELS}
data-title="live-channels"
data-title={LOG_MENU.FEATURED_BRANDS_LIVE_CHANNELS}
/>
{isVideoErrorOccurred ? (
@@ -112,6 +120,7 @@ export default memo(function LiveChannels({
key={"live-channels-horizontal-contents-" + contentsIndex}
scrollTopBody={scrollTopBody}
selectedPatnrId={selectedPatnrId}
handleItemFocus={_handleItemFocus}
/>
)
)}

View File

@@ -28,6 +28,7 @@ const Container = SpotlightContainerDecorator(
export default memo(function LiveChannelsHorizontalContents({
brandChanInfoItem,
contentsIndex,
handleItemFocus,
selectedPatnrId,
scrollTopBody,
}) {
@@ -112,6 +113,10 @@ export default memo(function LiveChannelsHorizontalContents({
}, [chanId, dispatch, patnrId, showId, showUrl]);
const handleFocus = useCallback(() => {
if (handleItemFocus) {
handleItemFocus("LOG_MENU");
}
if (cursorVisible) {
return;
}
@@ -122,7 +127,13 @@ export default memo(function LiveChannelsHorizontalContents({
scrollTopBody,
contentsIndex === 0 ? 110 : 36
);
}, [cursorVisible, contentsIndex, scrollTopBody, scrollTopByDistance]);
}, [
cursorVisible,
contentsIndex,
handleItemFocus,
scrollTopBody,
scrollTopByDistance,
]);
return (
<Container

View File

@@ -1,4 +1,4 @@
import React, { memo, useMemo } from "react";
import React, { memo, useCallback, useMemo } from "react";
import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
@@ -6,6 +6,7 @@ import SectionTitle from "../../../components/SectionTitle/SectionTitle";
import { $L } from "../../../utils/helperMethods";
import css from "./UpComing.module.less";
import UpComingList from "./UpComingList/UpComingList";
import { LOG_MENU } from "../../../utils/Config";
const Container = SpotlightContainerDecorator(
{ leaveFor: { right: "" }, enterTo: "last-focused" },
@@ -21,14 +22,22 @@ export default memo(function UpComing({
scrollTopBody,
selectedPatnrId,
order,
handleItemFocus,
}) {
const orderStyle = useMemo(() => ({ order: order }), [order]);
const _handleItemFocus = useCallback(() => {
if (handleItemFocus) {
handleItemFocus(LOG_MENU.FEATURED_BRANDS_UPCOMING);
}
}, [handleItemFocus]);
return (
<Container className={css.container} style={orderStyle}>
<SectionTitle title={STRING_CONF.UPCOMING} data-title="upcoming" />
<UpComingList
brandLiveChannelUpcoming={brandLiveChannelUpcoming}
handleItemFocus={_handleItemFocus}
scrollTopBody={scrollTopBody}
selectedPatnrId={selectedPatnrId}
/>

View File

@@ -17,6 +17,7 @@ import { ACTIVE_POPUP } from "../../../../utils/Config";
export default memo(function UpComingList({
brandLiveChannelUpcoming,
handleItemFocus,
scrollTopBody,
selectedPatnrId,
}) {
@@ -119,6 +120,10 @@ export default memo(function UpComingList({
);
const handleFocus = useCallback(() => {
if (handleItemFocus) {
handleItemFocus();
}
if (cursorVisible) {
return;
}
@@ -129,7 +134,7 @@ export default memo(function UpComingList({
scrollTopBody,
36
);
}, [cursorVisible, scrollTopBody, scrollTopByDistance]);
}, [cursorVisible, handleItemFocus, scrollTopBody, scrollTopByDistance]);
const renderItem = useCallback(
({ index, ...rest }) => {

View File

@@ -33,7 +33,7 @@ const HeaderButtonContainer = SpotlightContainerDecorator(
);
export default function Reminders({ title, cbScrollTo }) {
const { sendLogMyPageAlert } = useLogService();
const { sendLogMyPageAlertFlag, sendLogMyPageMyDelete } = useLogService();
const dispatch = useDispatch();
@@ -52,7 +52,8 @@ export default function Reminders({ title, cbScrollTo }) {
const [selectedItems, setSelectedItems] = useState({});
const [selectAll, setSelectAll] = useState(false);
let timerRef = useRef();
const focusTimerRef = useRef();
const alertShowTimer = useRef(null);
const handleToggleSwitchButton = useCallback(() => {
const flag = useAlarm ? "N" : "Y";
@@ -67,11 +68,11 @@ export default function Reminders({ title, cbScrollTo }) {
dispatch(setMyUpcomingUseAlert({ upcomingAlamUseFlag: flag }));
setUseAlarm(!useAlarm);
sendLogMyPageAlert({
sendLogMyPageAlertFlag({
alertFlag: flag === "N" ? "off" : "on",
logTpNo: Config.LOG_TP_NO.MY_PAGE.ALERT_FLAG,
});
}, [dispatch, sendLogMyPageAlert, useAlarm]);
}, [dispatch, sendLogMyPageAlertFlag, useAlarm]);
const handleDeleteBtnClick = useCallback(() => {
if (activeDelete) {
@@ -103,11 +104,20 @@ export default function Reminders({ title, cbScrollTo }) {
if (showList.length > 0) {
dispatch(deleteMyUpcomingAlertShow({ showList }));
dispatch(getMyUpcomingAlertShow());
alertShowTimer.current = setTimeout(() => {
dispatch(getMyUpcomingAlertShow());
sendLogMyPageMyDelete({
cnt: `${showList.length}`,
entryMenu: Config.LOG_MENU.MY_PAGE,
logTpNo: Config.LOG_TP_NO.MY_PAGE.MY_DELETE,
nowMenu: Config.LOG_MENU.MY_PAGE_REMINDERS,
});
}, 200);
}
}
dispatch(getMyUpcomingAlertShow());
setActiveDelete((prev) => !prev);
}, [dispatch, upComingAlertShow, selectedItems, activeDelete]);
@@ -126,7 +136,7 @@ export default function Reminders({ title, cbScrollTo }) {
}, [selectAll, selectedItems]);
const handleItemToggle = useCallback(
(showId) => {
(showId) => () => {
setSelectedItems((prev) => ({ ...prev, [showId]: !prev[showId] }));
setSelectAll(
Object.values({
@@ -163,12 +173,12 @@ export default function Reminders({ title, cbScrollTo }) {
upComingAlertShow.alertShows &&
upComingAlertShow.alertShows.length > 0
) {
timerRef.current = setTimeout(
focusTimerRef.current = setTimeout(
() => Spotlight.focus(SpotlightIds.MY_PAGE_REMINDRES_BOX),
0
);
} else {
timerRef.current = setTimeout(
focusTimerRef.current = setTimeout(
() => Spotlight.focus("mypage-reminder-checkbox"),
0
);
@@ -176,7 +186,10 @@ export default function Reminders({ title, cbScrollTo }) {
}, []);
useEffect(() => {
return () => timerRef.current && clearTimeout(timerRef.current);
return () => {
clearTimeout(focusTimerRef.current);
clearTimeout(alertShowTimer.current);
};
}, []);
useEffect(() => {
@@ -227,7 +240,7 @@ export default function Reminders({ title, cbScrollTo }) {
};
removeOldItems();
}, [upComingAlertShow]);
}, [dispatch, upComingAlertShow]);
const renderItem = useCallback(
({ index, ...rest }) => {
@@ -258,7 +271,7 @@ export default function Reminders({ title, cbScrollTo }) {
thumbnailUrl={listItem.thumbnailUrl}
activeDelete={activeDelete}
selected={selectedItems[listItem.showId]}
onToggle={() => handleItemToggle(listItem.showId)}
onToggle={handleItemToggle(listItem.showId)}
index={index}
/>
);

View File

@@ -12,7 +12,7 @@ import TButton, { TYPES } from "../../components/TButton/TButton";
import { removeDotAndColon } from "../../components/TItemCard/TItemCard";
import TPanel from "../../components/TPanel/TPanel";
import useScrollTo from "../../hooks/useScrollTo";
import { LOG_TP_NO, panel_names } from "../../utils/Config";
import { LOG_MENU, LOG_TP_NO, panel_names } from "../../utils/Config";
import OnSaleContents from "./OnSaleContents/OnSaleContents";
import OnSaleNav from "./OnSaleNav/OnSaleNav";
import css from "./OnSalePanel.module.less";
@@ -24,7 +24,7 @@ const getExpsOrdByLgCatCd = (array, value) => {
};
export default function OnSalePanel() {
const { sendLogCuration } = useLogService();
const { sendLogCuration, sendLogGNB } = useLogService();
const { getScrollTo: getScrollToBody, scrollTop: scrollTopBody } =
useScrollTo();
@@ -89,6 +89,10 @@ export default function OnSalePanel() {
// dispatch(changeAppStatus({ showLoadingPanel }));
// }, [dispatch, isLoading]);
useEffect(() => {
sendLogGNB(LOG_MENU.ON_SALE);
}, [sendLogGNB]);
useEffect(() => {
if (isInitialRendered) {
if (previousPanelIsDetail) {