entry, now 로그 수정

This commit is contained in:
opacity@t-win.kr
2025-09-29 18:09:48 +09:00
parent 64117df3da
commit b701c91989
3 changed files with 33 additions and 22 deletions

View File

@@ -20,7 +20,8 @@ const initialState = {
},
broadcast: {},
httpHeader: null,
isGnbOpened: false, popup: {
isGnbOpened: false,
popup: {
popupVisible: false,
activePopup: null,
secondaryPopup: null,
@@ -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",
},
};
}

View File

@@ -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]);

View File

@@ -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