[IntroPanel] Log, IF-LGSP-LOG-101 약관 동의, 미동의 클릭 이력 반영
This commit is contained in:
@@ -4,6 +4,7 @@ import { LOG_TP_NO } from "../utils/Config";
|
||||
|
||||
export const getUrlByLogTpNo = (logTpNo) => {
|
||||
switch (logTpNo) {
|
||||
// IG-LGSP-LOG-001 / Live 시청 이력
|
||||
case LOG_TP_NO.LIVE.HOME:
|
||||
case LOG_TP_NO.LIVE.FEATURED_BRANDS:
|
||||
case LOG_TP_NO.LIVE.FULL:
|
||||
@@ -19,20 +20,29 @@ export const getUrlByLogTpNo = (logTpNo) => {
|
||||
// case "156":
|
||||
// return URLS.LOG_VOD;
|
||||
|
||||
// IF-LGSP-LOG-003 / Curations View 이력
|
||||
case LOG_TP_NO.CURATION.HOT_PICKS:
|
||||
case LOG_TP_NO.CURATION.ON_SALE:
|
||||
case LOG_TP_NO.CURATION.HOME:
|
||||
case LOG_TP_NO.CURATION.CATEGORY:
|
||||
return URLS.LOG_CURATION;
|
||||
|
||||
// IF-LGSP-LOG-005 / GNB 클릭 이력
|
||||
case LOG_TP_NO.GNB:
|
||||
return URLS.LOG_GNB;
|
||||
|
||||
// IF-LGSP-LOG-009 / Partners 클릭 이력
|
||||
case LOG_TP_NO.PARTNERS:
|
||||
return URLS.LOG_PARTNERS;
|
||||
|
||||
// IF-LGSP-LOG-110 / Featured Brands View 이력
|
||||
case LOG_TP_NO.BRANDS:
|
||||
return URLS.LOG_BRANDS;
|
||||
|
||||
// IF-LGSP-LOG-101 / 약관 동의, 미동의 클릭 이력
|
||||
case LOG_TP_NO.TERMS.AGREE:
|
||||
case LOG_TP_NO.TERMS.DO_NOT_AGREE:
|
||||
return URLS.LOG_TERMS;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import {
|
||||
useDispatch,
|
||||
// useSelector
|
||||
} from "react-redux";
|
||||
import { LOG_MENU, LOG_TP_NO } from "../utils/Config";
|
||||
import { postLog } from "../actions/logActions";
|
||||
import { useCallback, useMemo } from "react";
|
||||
import {
|
||||
useCallback,
|
||||
// useMemo
|
||||
} from "react";
|
||||
import { formatGMTString } from "../utils/helperMethods";
|
||||
|
||||
export default function useLogService() {
|
||||
@@ -253,11 +259,37 @@ export default function useLogService() {
|
||||
},
|
||||
[dispatch]
|
||||
);
|
||||
|
||||
/**
|
||||
* IF-LGSP-LOG-101 / 약관 동의, 미동의 클릭 이력
|
||||
*
|
||||
* (M) entryMenu 진입 메뉴
|
||||
*
|
||||
* (M) logTpNo 로그 타입 넘버
|
||||
*
|
||||
* (M) nowMenu 현재 메뉴
|
||||
*/
|
||||
const sendLogTerms = useCallback(
|
||||
(params) => {
|
||||
const { logTpNo } = params;
|
||||
|
||||
const newParams = {
|
||||
entryMenu: LOG_MENU.APP,
|
||||
logTpNo,
|
||||
nowMenu: LOG_MENU.INTRO_TERMS,
|
||||
};
|
||||
|
||||
dispatch(postLog(newParams));
|
||||
},
|
||||
[dispatch]
|
||||
);
|
||||
|
||||
return {
|
||||
sendLogLive,
|
||||
sendLogCuration,
|
||||
sendLogGNB,
|
||||
sendLogPartners,
|
||||
sendLogFeaturedBrands,
|
||||
sendLogTerms,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -99,7 +99,10 @@ export const LOG_TP_NO = {
|
||||
|
||||
SHOP_BY_MOBILE: {},
|
||||
|
||||
TERMS: {},
|
||||
TERMS: {
|
||||
AGREE: "650",
|
||||
DO_NOT_AGREE: "651",
|
||||
},
|
||||
|
||||
MY_INFO: {},
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import * as Config from "../../utils/Config";
|
||||
import { panel_names } from "../../utils/Config";
|
||||
import { $L } from "../../utils/helperMethods";
|
||||
import css from "./IntroPanel.module.less";
|
||||
import useLogService from "../../hooks/useLogService";
|
||||
|
||||
const Container = SpotlightContainerDecorator(
|
||||
{ enterTo: "last-focused" },
|
||||
@@ -37,8 +38,10 @@ export default function IntroPanel({
|
||||
}) {
|
||||
delete rest.isTabActivated;
|
||||
delete rest.panelInfo;
|
||||
const dispatch = useDispatch();
|
||||
|
||||
useDebugKey({});
|
||||
const { sendLogTerms } = useLogService();
|
||||
const dispatch = useDispatch();
|
||||
const termsData = useSelector((state) => state.home.termsData);
|
||||
const { popupVisible, activePopup } = useSelector(
|
||||
(state) => state.common.popup
|
||||
@@ -83,13 +86,16 @@ export default function IntroPanel({
|
||||
})
|
||||
);
|
||||
|
||||
sendLogTerms({ logTpNo: Config.LOG_TP_NO.TERMS.AGREE });
|
||||
// dispatch(popPanel(Config.panel_names.INTRO_PANEL));
|
||||
}
|
||||
}, [introTermsData, dispatch]);
|
||||
}, [introTermsData, dispatch, sendLogTerms]);
|
||||
|
||||
const handleDisagree = useCallback(() => {
|
||||
dispatch(setShowPopup(Config.ACTIVE_POPUP.exitPopup));
|
||||
}, [dispatch]);
|
||||
|
||||
sendLogTerms({ logTpNo: Config.LOG_TP_NO.TERMS.DO_NOT_AGREE });
|
||||
}, [dispatch, sendLogTerms]);
|
||||
|
||||
const onExit = useCallback(() => {
|
||||
dispatch(setExitApp());
|
||||
|
||||
Reference in New Issue
Block a user