entry, now 로그 수정
This commit is contained in:
@@ -20,7 +20,8 @@ const initialState = {
|
||||
},
|
||||
broadcast: {},
|
||||
httpHeader: null,
|
||||
isGnbOpened: false, popup: {
|
||||
isGnbOpened: false,
|
||||
popup: {
|
||||
popupVisible: false,
|
||||
activePopup: null,
|
||||
secondaryPopup: null,
|
||||
@@ -32,7 +33,7 @@ const initialState = {
|
||||
optionalTermsConfirmSelected: false,
|
||||
},
|
||||
termsFlag: null,
|
||||
termsLoading: false, // 25.06.16 추가
|
||||
termsLoading: false, // 25.06.16 추가
|
||||
introTermsAgree: undefined, // Y, N
|
||||
checkoutTermsAgree: undefined,
|
||||
useLog: true,
|
||||
@@ -85,9 +86,9 @@ const initialState = {
|
||||
|
||||
// 선택약관 팝업 상태 관리 (TV 환경 최적화)
|
||||
optionalTermsPopupFlow: {
|
||||
popupShown: false, // 팝업 표시 여부
|
||||
userDecision: null, // 'agreed' | 'declined' | null
|
||||
agreedInSession: false, // 세션 내 동의 여부 (로컬 상태 기반)
|
||||
popupShown: false, // 팝업 표시 여부
|
||||
userDecision: null, // 'agreed' | 'declined' | null
|
||||
agreedInSession: false, // 세션 내 동의 여부 (로컬 상태 기반)
|
||||
},
|
||||
};
|
||||
|
||||
@@ -184,7 +185,8 @@ export const commonReducer = (state = initialState, action) => {
|
||||
secondaryPopupVisible: false,
|
||||
secondaryPopup: null,
|
||||
},
|
||||
}; case types.SET_HIDE_SECONDARY_POPUP:
|
||||
};
|
||||
case types.SET_HIDE_SECONDARY_POPUP:
|
||||
return {
|
||||
...state,
|
||||
popup: {
|
||||
@@ -233,8 +235,13 @@ export const commonReducer = (state = initialState, action) => {
|
||||
}
|
||||
|
||||
case types.GET_TERMS_AGREE_YN_SUCCESS: {
|
||||
const { privacyTerms, serviceTerms, purchaseTerms, paymentTerms, optionalTerms } =
|
||||
action.payload;
|
||||
const {
|
||||
privacyTerms,
|
||||
serviceTerms,
|
||||
purchaseTerms,
|
||||
paymentTerms,
|
||||
optionalTerms,
|
||||
} = action.payload;
|
||||
|
||||
const introTermsAgree = privacyTerms === "Y" && serviceTerms === "Y";
|
||||
const checkoutTermsAgree = purchaseTerms === "Y" && paymentTerms === "Y";
|
||||
@@ -262,9 +269,11 @@ export const commonReducer = (state = initialState, action) => {
|
||||
case types.GET_HOME_TERMS: {
|
||||
const newTermsStatus = { ...state.termsAgreementStatus };
|
||||
if (action.payload?.data?.terms) {
|
||||
action.payload.data.terms.forEach(term => {
|
||||
if (Object.prototype.hasOwnProperty.call(newTermsStatus, term.trmsTpCd)) {
|
||||
newTermsStatus[term.trmsTpCd] = term.trmsAgrFlag === 'Y';
|
||||
action.payload.data.terms.forEach((term) => {
|
||||
if (
|
||||
Object.prototype.hasOwnProperty.call(newTermsStatus, term.trmsTpCd)
|
||||
) {
|
||||
newTermsStatus[term.trmsTpCd] = term.trmsAgrFlag === "Y";
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -279,7 +288,7 @@ export const commonReducer = (state = initialState, action) => {
|
||||
const newTermsStatus = { ...state.termsAgreementStatus };
|
||||
// action payload에 담겨온 동의한 약관 코드 리스트를 기반으로 상태 업데이트
|
||||
if (action.payload?.agreedTermCodes) {
|
||||
action.payload.agreedTermCodes.forEach(termCode => {
|
||||
action.payload.agreedTermCodes.forEach((termCode) => {
|
||||
if (Object.prototype.hasOwnProperty.call(newTermsStatus, termCode)) {
|
||||
newTermsStatus[termCode] = true;
|
||||
}
|
||||
@@ -288,7 +297,7 @@ export const commonReducer = (state = initialState, action) => {
|
||||
return {
|
||||
...state,
|
||||
termsLoading: false,
|
||||
termsAgreementStatus: newTermsStatus
|
||||
termsAgreementStatus: newTermsStatus,
|
||||
};
|
||||
}
|
||||
case types.SET_MYPAGE_TERMS_AGREE_FAIL:
|
||||
@@ -310,7 +319,7 @@ export const commonReducer = (state = initialState, action) => {
|
||||
...state.termsAgreementStatus,
|
||||
MST00401: true,
|
||||
MST00402: true,
|
||||
}
|
||||
},
|
||||
};
|
||||
} else {
|
||||
return state;
|
||||
@@ -398,7 +407,7 @@ export const commonReducer = (state = initialState, action) => {
|
||||
optionalTermsPopupFlow: {
|
||||
...state.optionalTermsPopupFlow,
|
||||
userDecision: action.payload,
|
||||
agreedInSession: action.payload === 'agreed',
|
||||
agreedInSession: action.payload === "agreed",
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
||||
import React, { use, useCallback, useEffect, useMemo, useRef } from "react";
|
||||
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
@@ -96,13 +96,13 @@ export default function ShowOption({
|
||||
inDt: formatGMTString(new Date()),
|
||||
linkTpCd: panelInfo?.linkTpCd ?? "",
|
||||
logTpNo: LOG_TP_NO.DETAIL.THEME_DETAIL,
|
||||
patncNm: themeInfo?.patncNm ?? "",
|
||||
patnrId: themeInfo?.patnrId ?? "",
|
||||
patncNm: themeInfo?.productInfos[selectedIndex]?.patncNm ?? "",
|
||||
patnrId: themeInfo?.productInfos[selectedIndex]?.patnrId ?? "",
|
||||
};
|
||||
|
||||
detailLogParamsRef.current = params;
|
||||
|
||||
return () => dispatch(sendLogDetail(params));
|
||||
dispatch(sendLogDetail(params));
|
||||
}
|
||||
}, [productData]);
|
||||
|
||||
|
||||
@@ -361,9 +361,11 @@ const PlayerPanel = ({
|
||||
prevNowMenuRef.current = nowMenuRef.current;
|
||||
|
||||
return () => dispatch(sendLogGNB(prevNowMenuRef.current));
|
||||
} else if (panelInfo?.modal) {
|
||||
dispatch(sendLogGNB(entryMenu));
|
||||
}
|
||||
// 통합로그 관련 : al_banner_shown 관련
|
||||
// else if (panelInfo?.modal) {
|
||||
// dispatch(sendLogGNB(entryMenu));
|
||||
// }
|
||||
}, [panelInfo?.modal, panelInfo?.shptmBanrTpNm]);
|
||||
|
||||
// creating live log params
|
||||
|
||||
Reference in New Issue
Block a user