[251126] fix: Remove Lint warinings - 1
🕐 커밋 시간: 2025. 11. 26. 14:59:11 📊 변경 통계: • 총 파일: 12개 • 추가: +47줄 • 삭제: -50줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/App/App.js ~ com.twin.app.shoptime/src/App/deepLinkHandler.js ~ com.twin.app.shoptime/src/actions/appDataActions.js ~ com.twin.app.shoptime/src/actions/billingActions.js ~ com.twin.app.shoptime/src/actions/brandActions.js ~ com.twin.app.shoptime/src/actions/cancelActions.js ~ com.twin.app.shoptime/src/actions/cardActions.js ~ com.twin.app.shoptime/src/actions/checkoutActions.js ~ com.twin.app.shoptime/src/actions/commonActions.js ~ com.twin.app.shoptime/src/actions/convertActions.js ~ com.twin.app.shoptime/src/actions/couponActions.js ~ com.twin.app.shoptime/src/views/UserReview/UserReviewPanel.jsx 🔧 주요 변경 내용: • 핵심 비즈니스 로직 개선 • 소규모 기능 개선 • 코드 정리 및 최적화 • 모듈 구조 개선 Performance: 코드 최적화로 성능 개선 기대
This commit is contained in:
@@ -18,7 +18,6 @@ import { ThemeDecorator } from '@enact/sandstone/ThemeDecorator';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
changeAppStatus,
|
changeAppStatus,
|
||||||
changeLocalSettings,
|
|
||||||
// cancelFocusElement,
|
// cancelFocusElement,
|
||||||
// focusElement,
|
// focusElement,
|
||||||
// setExitApp,
|
// setExitApp,
|
||||||
@@ -280,7 +279,7 @@ const originFocus = Spotlight.focus;
|
|||||||
const originMove = Spotlight.move;
|
const originMove = Spotlight.move;
|
||||||
const originSilentlyFocus = Spotlight.silentlyFocus;
|
const originSilentlyFocus = Spotlight.silentlyFocus;
|
||||||
let lastLoggedSpotlightId = null;
|
let lastLoggedSpotlightId = null;
|
||||||
let lastLoggedBlurSpotlightId = null;
|
let lastLoggedBlurSpotlightId = null; // eslint-disable-line no-unused-vars
|
||||||
let focusLoggingSuppressed = 0;
|
let focusLoggingSuppressed = 0;
|
||||||
|
|
||||||
const resolveSpotlightIdFromNode = (node) => {
|
const resolveSpotlightIdFromNode = (node) => {
|
||||||
@@ -427,7 +426,7 @@ Spotlight.silentlyFocus = function (...args) {
|
|||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
|
|
||||||
function AppBase(_props) {
|
function AppBase(_props /* eslint-disable-line no-unused-vars */) {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const httpHeader = useSelector((state) => state.common.httpHeader);
|
const httpHeader = useSelector((state) => state.common.httpHeader);
|
||||||
const httpHeaderRef = useRef(httpHeader);
|
const httpHeaderRef = useRef(httpHeader);
|
||||||
@@ -629,7 +628,7 @@ function AppBase(_props) {
|
|||||||
clearLaunchParams();
|
clearLaunchParams();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[/* dispatch */]
|
[dispatch],
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleRelaunchEvent = useCallback(() => {
|
const handleRelaunchEvent = useCallback(() => {
|
||||||
@@ -683,7 +682,7 @@ function AppBase(_props) {
|
|||||||
if (typeof window === 'object' && window.PalmSystem) {
|
if (typeof window === 'object' && window.PalmSystem) {
|
||||||
window.PalmSystem.activate();
|
window.PalmSystem.activate();
|
||||||
}
|
}
|
||||||
}, [initService, introTermsAgreeRef /*, dispatch */]);
|
}, [initService, introTermsAgreeRef]);
|
||||||
|
|
||||||
const visibilityChanged = useCallback(() => {
|
const visibilityChanged = useCallback(() => {
|
||||||
// console.log('document is hidden', document.hidden);
|
// console.log('document is hidden', document.hidden);
|
||||||
@@ -727,7 +726,7 @@ function AppBase(_props) {
|
|||||||
}, [dispatch]);
|
}, [dispatch]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const keyDownEvent = (_event) => {
|
const keyDownEvent = (_event /* eslint-disable-line no-unused-vars */) => {
|
||||||
dispatch(changeAppStatus({ cursorVisible: false }));
|
dispatch(changeAppStatus({ cursorVisible: false }));
|
||||||
Spotlight.setPointerMode(false);
|
Spotlight.setPointerMode(false);
|
||||||
};
|
};
|
||||||
@@ -736,7 +735,7 @@ function AppBase(_props) {
|
|||||||
let lastMoveTime = 0;
|
let lastMoveTime = 0;
|
||||||
const THROTTLE_MS = 100;
|
const THROTTLE_MS = 100;
|
||||||
|
|
||||||
const mouseMoveEvent = (_event) => {
|
const mouseMoveEvent = (_event /* eslint-disable-line no-unused-vars */) => {
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
if (now - lastMoveTime < THROTTLE_MS) {
|
if (now - lastMoveTime < THROTTLE_MS) {
|
||||||
// throttle 기간 내에는 hideCursor만 재시작
|
// throttle 기간 내에는 hideCursor만 재시작
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useDispatch } from "react-redux";
|
|
||||||
import { updateHomeInfo } from "../actions/homeActions";
|
import { updateHomeInfo } from "../actions/homeActions";
|
||||||
import { pushPanel } from "../actions/panelActions";
|
import { pushPanel } from "../actions/panelActions";
|
||||||
import {
|
import {
|
||||||
@@ -11,7 +11,7 @@ import { SpotlightIds } from "../utils/SpotlightIds";
|
|||||||
import { sendLogTotalRecommend } from "../actions/logActions";
|
import { sendLogTotalRecommend } from "../actions/logActions";
|
||||||
|
|
||||||
//V2_진입경로코드_진입경로명_MT_노출순번
|
//V2_진입경로코드_진입경로명_MT_노출순번
|
||||||
export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
export const handleDeepLink = (contentTarget) => (dispatch, _getState) => {
|
||||||
console.log("[handleDeepLink] ~ contentTarget: ", contentTarget);
|
console.log("[handleDeepLink] ~ contentTarget: ", contentTarget);
|
||||||
let linkTpCd; // 진입경로코드
|
let linkTpCd; // 진입경로코드
|
||||||
let linkTpNm; // 진입경로명
|
let linkTpNm; // 진입경로명
|
||||||
@@ -21,7 +21,6 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|||||||
let curationId; // 큐레이션아이디
|
let curationId; // 큐레이션아이디
|
||||||
let showId; // 방송아이디
|
let showId; // 방송아이디
|
||||||
let chanId; // 채널아이디
|
let chanId; // 채널아이디
|
||||||
let expsOrd; // 노출순번
|
|
||||||
let grNumber; // 그룹번호
|
let grNumber; // 그룹번호
|
||||||
let evntId; // 이벤트아이디
|
let evntId; // 이벤트아이디
|
||||||
let lgCatCd; // LG카테고리Code
|
let lgCatCd; // LG카테고리Code
|
||||||
@@ -65,7 +64,6 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|||||||
// V3_진입경로코드_진입경로명_PD_파트너아이디_상품아이디_노출순번_큐레이션아이디
|
// V3_진입경로코드_진입경로명_PD_파트너아이디_상품아이디_노출순번_큐레이션아이디
|
||||||
patnrId = tokens[4]; // 파트너아이디
|
patnrId = tokens[4]; // 파트너아이디
|
||||||
prdtId = tokens[5]; // 상품아이디
|
prdtId = tokens[5]; // 상품아이디
|
||||||
expsOrd = tokens[6]; // 노출순번
|
|
||||||
curationId = tokens[7]; // 큐레이션아이디
|
curationId = tokens[7]; // 큐레이션아이디
|
||||||
panelName = panel_names.DETAIL_PANEL;
|
panelName = panel_names.DETAIL_PANEL;
|
||||||
deeplinkPanel = "Product Detaoil";
|
deeplinkPanel = "Product Detaoil";
|
||||||
@@ -81,7 +79,6 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|||||||
// V3_진입경로코드_진입경로명_LS_파트너아이디_채널아이디_노출순번_큐레이션아이디
|
// V3_진입경로코드_진입경로명_LS_파트너아이디_채널아이디_노출순번_큐레이션아이디
|
||||||
patnrId = tokens[4]; // 파트너아이디
|
patnrId = tokens[4]; // 파트너아이디
|
||||||
chanId = tokens[5]; // 채널아이디
|
chanId = tokens[5]; // 채널아이디
|
||||||
expsOrd = tokens[6]; // 노출순번
|
|
||||||
curationId = tokens[7]; // 큐레이션아이디
|
curationId = tokens[7]; // 큐레이션아이디
|
||||||
panelName = panel_names.PLAYER_PANEL;
|
panelName = panel_names.PLAYER_PANEL;
|
||||||
deeplinkPanel = "Live Show";
|
deeplinkPanel = "Live Show";
|
||||||
@@ -98,7 +95,6 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|||||||
// V3_진입경로코드_진입경로명_VS_파트너아이디_방송아이디_노출순번_큐레이션아이디
|
// V3_진입경로코드_진입경로명_VS_파트너아이디_방송아이디_노출순번_큐레이션아이디
|
||||||
patnrId = tokens[4]; // 파트너아이디
|
patnrId = tokens[4]; // 파트너아이디
|
||||||
showId = tokens[5]; // 방송아이디
|
showId = tokens[5]; // 방송아이디
|
||||||
expsOrd = tokens[6]; // 노출순번
|
|
||||||
curationId = tokens[7]; // 큐레이션아이디
|
curationId = tokens[7]; // 큐레이션아이디
|
||||||
panelName = panel_names.PLAYER_PANEL;
|
panelName = panel_names.PLAYER_PANEL;
|
||||||
deeplinkPanel = "VOD Show";
|
deeplinkPanel = "VOD Show";
|
||||||
@@ -119,7 +115,6 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|||||||
patnrId = tokens[4]; // 파트너아이디
|
patnrId = tokens[4]; // 파트너아이디
|
||||||
curationId = tokens[5]; // 큐레이션아이디\
|
curationId = tokens[5]; // 큐레이션아이디\
|
||||||
prdtId = tokens[6]; // 상품아이디
|
prdtId = tokens[6]; // 상품아이디
|
||||||
expsOrd = tokens[7]; // 노출순번
|
|
||||||
grNumber = tokens[8]; // 그룹번호
|
grNumber = tokens[8]; // 그룹번호
|
||||||
panelName = panel_names.DETAIL_PANEL;
|
panelName = panel_names.DETAIL_PANEL;
|
||||||
deeplinkPanel = "Theme Detail";
|
deeplinkPanel = "Theme Detail";
|
||||||
@@ -140,7 +135,6 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|||||||
|
|
||||||
patnrId = tokens[4]; // 파트너아이디
|
patnrId = tokens[4]; // 파트너아이디
|
||||||
curationId = tokens[5]; // 큐레이션아이디
|
curationId = tokens[5]; // 큐레이션아이디
|
||||||
expsOrd = tokens[6]; // 노출순번
|
|
||||||
panelName = panel_names.DETAIL_PANEL;
|
panelName = panel_names.DETAIL_PANEL;
|
||||||
deeplinkPanel = "Hotel Detail";
|
deeplinkPanel = "Hotel Detail";
|
||||||
panelInfo = {
|
panelInfo = {
|
||||||
@@ -157,7 +151,6 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|||||||
|
|
||||||
patnrId = tokens[4]; // 파트너아이디
|
patnrId = tokens[4]; // 파트너아이디
|
||||||
curationId = tokens[5]; // 큐레이션아이디
|
curationId = tokens[5]; // 큐레이션아이디
|
||||||
expsOrd = tokens[6]; // 노출순번
|
|
||||||
panelName = panel_names.HOT_PICKS_PANEL;
|
panelName = panel_names.HOT_PICKS_PANEL;
|
||||||
deeplinkPanel = "Hot Picks";
|
deeplinkPanel = "Hot Picks";
|
||||||
panelInfo = {
|
panelInfo = {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { createDebugHelpers } from '../utils/debug';
|
|||||||
|
|
||||||
// 디버그 헬퍼 설정
|
// 디버그 헬퍼 설정
|
||||||
const DEBUG_MODE = false;
|
const DEBUG_MODE = false;
|
||||||
const { dlog, dwarn, derror } = createDebugHelpers(DEBUG_MODE);
|
const { dlog, derror } = createDebugHelpers(DEBUG_MODE);
|
||||||
|
|
||||||
export const addMainIndex = (index) => ({
|
export const addMainIndex = (index) => ({
|
||||||
type: types.ADD_MAIN_INDEX,
|
type: types.ADD_MAIN_INDEX,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { createDebugHelpers } from '../utils/debug';
|
|||||||
|
|
||||||
// 디버그 헬퍼 설정
|
// 디버그 헬퍼 설정
|
||||||
const DEBUG_MODE = false;
|
const DEBUG_MODE = false;
|
||||||
const { dlog, dwarn, derror } = createDebugHelpers(DEBUG_MODE);
|
const { dlog, derror } = createDebugHelpers(DEBUG_MODE);
|
||||||
|
|
||||||
// IF-LGSP-328 : 회원 Billing Address 조회
|
// IF-LGSP-328 : 회원 Billing Address 조회
|
||||||
export const getMyInfoBillingSearch = (props) => (dispatch, getState) => {
|
export const getMyInfoBillingSearch = (props) => (dispatch, getState) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { createDebugHelpers } from '../utils/debug';
|
|||||||
|
|
||||||
// 디버그 헬퍼 설정
|
// 디버그 헬퍼 설정
|
||||||
const DEBUG_MODE = false;
|
const DEBUG_MODE = false;
|
||||||
const { dlog, dwarn, derror } = createDebugHelpers(DEBUG_MODE);
|
const { derror } = createDebugHelpers(DEBUG_MODE);
|
||||||
|
|
||||||
// Featured Brands 정보 조회 IF-LGSP-304
|
// Featured Brands 정보 조회 IF-LGSP-304
|
||||||
export const getBrandList = () => (dispatch, getState) => {
|
export const getBrandList = () => (dispatch, getState) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { createDebugHelpers } from '../utils/debug';
|
|||||||
|
|
||||||
// 디버그 헬퍼 설정
|
// 디버그 헬퍼 설정
|
||||||
const DEBUG_MODE = false;
|
const DEBUG_MODE = false;
|
||||||
const { dlog, dwarn, derror } = createDebugHelpers(DEBUG_MODE);
|
const { dlog, derror } = createDebugHelpers(DEBUG_MODE);
|
||||||
|
|
||||||
// 회원 주문 취소/반품/교환 사유 조회 (IF-LGSP-347)
|
// 회원 주문 취소/반품/교환 사유 조회 (IF-LGSP-347)
|
||||||
export const getMyinfoOrderCancelColumnsSearch = (params, callback) => (dispatch, getState) => {
|
export const getMyinfoOrderCancelColumnsSearch = (params, callback) => (dispatch, getState) => {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { createDebugHelpers } from '../utils/debug';
|
|||||||
|
|
||||||
// 디버그 헬퍼 설정
|
// 디버그 헬퍼 설정
|
||||||
const DEBUG_MODE = false;
|
const DEBUG_MODE = false;
|
||||||
const { dlog, dwarn, derror } = createDebugHelpers(DEBUG_MODE);
|
const { dlog, derror } = createDebugHelpers(DEBUG_MODE);
|
||||||
|
|
||||||
// 회원의 등록 카드 정보 조회 IF-LGSP-332
|
// 회원의 등록 카드 정보 조회 IF-LGSP-332
|
||||||
export const getMyInfoCardSearch = (props) => (dispatch, getState) => {
|
export const getMyInfoCardSearch = (props) => (dispatch, getState) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { createDebugHelpers } from '../utils/debug';
|
|||||||
|
|
||||||
// 디버그 헬퍼 설정
|
// 디버그 헬퍼 설정
|
||||||
const DEBUG_MODE = false;
|
const DEBUG_MODE = false;
|
||||||
const { dlog, dwarn, derror } = createDebugHelpers(DEBUG_MODE);
|
const { dlog, derror } = createDebugHelpers(DEBUG_MODE);
|
||||||
|
|
||||||
// 회원 체크아웃 정보 조회 IF-LGSP-345
|
// 회원 체크아웃 정보 조회 IF-LGSP-345
|
||||||
export const getMyInfoCheckoutInfo = (props, callback) => (dispatch, getState) => {
|
export const getMyInfoCheckoutInfo = (props, callback) => (dispatch, getState) => {
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ export const loadingComplete = (status) => ({
|
|||||||
payload: status,
|
payload: status,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const alertToast = (payload) => (dispatch, getState) => {
|
export const alertToast = (payload) => (dispatch) => {
|
||||||
if (typeof window === 'object' && !window.PalmSystem) {
|
if (typeof window === 'object' && !window.PalmSystem) {
|
||||||
dispatch(changeAppStatus({ toast: true, toastText: payload }));
|
dispatch(changeAppStatus({ toast: true, toastText: payload }));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export const convertPdfToImage =
|
|||||||
const timeoutError = new Error(
|
const timeoutError = new Error(
|
||||||
`Conversion timeout after ${timeout}ms (attempt ${attempts})`
|
`Conversion timeout after ${timeout}ms (attempt ${attempts})`
|
||||||
);
|
);
|
||||||
dwarn(`⏱️ [EnergyLabel] Timeout on attempt ${attempts}:`, timeoutError.message);
|
void dwarn(`⏱️ [EnergyLabel] Timeout on attempt ${attempts}:`, timeoutError.message);
|
||||||
|
|
||||||
// 재시도 가능한 경우
|
// 재시도 가능한 경우
|
||||||
if (attempts < maxRetries + 1) {
|
if (attempts < maxRetries + 1) {
|
||||||
@@ -39,7 +39,7 @@ export const convertPdfToImage =
|
|||||||
attemptConversion();
|
attemptConversion();
|
||||||
} else {
|
} else {
|
||||||
// 최종 실패
|
// 최종 실패
|
||||||
derror(`❌ [EnergyLabel] Final failure after ${attempts} attempts:`, pdfUrl);
|
void derror(`❌ [EnergyLabel] Final failure after ${attempts} attempts:`, pdfUrl);
|
||||||
dispatch({
|
dispatch({
|
||||||
type: types.CONVERT_PDF_TO_IMAGE_FAILURE,
|
type: types.CONVERT_PDF_TO_IMAGE_FAILURE,
|
||||||
payload: { pdfUrl, error: timeoutError },
|
payload: { pdfUrl, error: timeoutError },
|
||||||
@@ -64,17 +64,14 @@ export const convertPdfToImage =
|
|||||||
|
|
||||||
if (retCode !== undefined && retCode !== 0 && retCode !== '0') {
|
if (retCode !== undefined && retCode !== 0 && retCode !== '0') {
|
||||||
const error = new Error(`API Error: retCode=${retCode}`);
|
const error = new Error(`API Error: retCode=${retCode}`);
|
||||||
dwarn(`⚠️ [EnergyLabel] API returned error on attempt ${attempts}:`, retCode);
|
void dwarn(`⚠️ [EnergyLabel] API returned error on attempt ${attempts}:`, retCode);
|
||||||
|
|
||||||
// retCode 에러도 재시도
|
// retCode 에러도 재시도
|
||||||
if (attempts < maxRetries + 1) {
|
if (attempts < maxRetries + 1) {
|
||||||
dlog(`🔄 [EnergyLabel] Retrying due to API error... (${attempts}/${maxRetries + 1})`);
|
void dlog(`🔄 [EnergyLabel] Retrying due to API error... (${attempts}/${maxRetries + 1})`);
|
||||||
attemptConversion();
|
attemptConversion();
|
||||||
} else {
|
} else {
|
||||||
derror(
|
void derror(`❌ [EnergyLabel] Final failure after ${attempts} attempts (API error):`, pdfUrl);
|
||||||
`❌ [EnergyLabel] Final failure after ${attempts} attempts (API error):`,
|
|
||||||
pdfUrl
|
|
||||||
);
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: types.CONVERT_PDF_TO_IMAGE_FAILURE,
|
type: types.CONVERT_PDF_TO_IMAGE_FAILURE,
|
||||||
payload: { pdfUrl, error },
|
payload: { pdfUrl, error },
|
||||||
@@ -111,7 +108,7 @@ export const convertPdfToImage =
|
|||||||
imageUrl = URL.createObjectURL(blob);
|
imageUrl = URL.createObjectURL(blob);
|
||||||
}
|
}
|
||||||
|
|
||||||
dlog(`✅ [EnergyLabel] Conversion successful on attempt ${attempts}:`, pdfUrl);
|
void dlog(`✅ [EnergyLabel] Conversion successful on attempt ${attempts}:`, pdfUrl);
|
||||||
dispatch({
|
dispatch({
|
||||||
type: types.CONVERT_PDF_TO_IMAGE_SUCCESS,
|
type: types.CONVERT_PDF_TO_IMAGE_SUCCESS,
|
||||||
payload: { pdfUrl, imageUrl },
|
payload: { pdfUrl, imageUrl },
|
||||||
@@ -119,16 +116,16 @@ export const convertPdfToImage =
|
|||||||
|
|
||||||
callback && callback(null, imageUrl);
|
callback && callback(null, imageUrl);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
derror(`❌ [EnergyLabel] Image creation failed on attempt ${attempts}:`, error);
|
void derror(`❌ [EnergyLabel] Image creation failed on attempt ${attempts}:`, error);
|
||||||
|
|
||||||
// 이미지 생성 실패도 재시도
|
// 이미지 생성 실패도 재시도
|
||||||
if (attempts < maxRetries + 1) {
|
if (attempts < maxRetries + 1) {
|
||||||
dlog(
|
void dlog(
|
||||||
`🔄 [EnergyLabel] Retrying due to image creation error... (${attempts}/${maxRetries + 1})`
|
`🔄 [EnergyLabel] Retrying due to image creation error... (${attempts}/${maxRetries + 1})`
|
||||||
);
|
);
|
||||||
attemptConversion();
|
attemptConversion();
|
||||||
} else {
|
} else {
|
||||||
derror(
|
void derror(
|
||||||
`❌ [EnergyLabel] Final failure after ${attempts} attempts (image error):`,
|
`❌ [EnergyLabel] Final failure after ${attempts} attempts (image error):`,
|
||||||
pdfUrl
|
pdfUrl
|
||||||
);
|
);
|
||||||
@@ -147,14 +144,14 @@ export const convertPdfToImage =
|
|||||||
timeoutId = null;
|
timeoutId = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
dwarn(`⚠️ [EnergyLabel] Network error on attempt ${attempts}:`, error.message);
|
void dwarn(`⚠️ [EnergyLabel] Network error on attempt ${attempts}:`, error.message);
|
||||||
|
|
||||||
// 네트워크 에러도 재시도
|
// 네트워크 에러도 재시도
|
||||||
if (attempts < maxRetries + 1) {
|
if (attempts < maxRetries + 1) {
|
||||||
dlog(`🔄 [EnergyLabel] Retrying due to network error... (${attempts}/${maxRetries + 1})`);
|
void dlog(`🔄 [EnergyLabel] Retrying due to network error... (${attempts}/${maxRetries + 1})`);
|
||||||
attemptConversion();
|
attemptConversion();
|
||||||
} else {
|
} else {
|
||||||
derror(
|
void derror(
|
||||||
`❌ [EnergyLabel] Final failure after ${attempts} attempts (network error):`,
|
`❌ [EnergyLabel] Final failure after ${attempts} attempts (network error):`,
|
||||||
pdfUrl
|
pdfUrl
|
||||||
);
|
);
|
||||||
@@ -188,7 +185,7 @@ export const convertPdfToImage =
|
|||||||
* @param {Array<string>} pdfUrls - 변환할 PDF URL 배열
|
* @param {Array<string>} pdfUrls - 변환할 PDF URL 배열
|
||||||
* @param {function} callback - 완료 후 실행할 콜백 (errors, results)
|
* @param {function} callback - 완료 후 실행할 콜백 (errors, results)
|
||||||
*/
|
*/
|
||||||
export const convertMultiplePdfs = (pdfUrls, callback) => async (dispatch, getState) => {
|
export const convertMultiplePdfs = (pdfUrls, callback) => async (dispatch) => {
|
||||||
if (!pdfUrls || pdfUrls.length === 0) {
|
if (!pdfUrls || pdfUrls.length === 0) {
|
||||||
callback && callback(null, []);
|
callback && callback(null, []);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { createDebugHelpers } from '../utils/debug';
|
|||||||
|
|
||||||
// 디버그 헬퍼 설정
|
// 디버그 헬퍼 설정
|
||||||
const DEBUG_MODE = false;
|
const DEBUG_MODE = false;
|
||||||
const { dlog, dwarn, derror } = createDebugHelpers(DEBUG_MODE);
|
const { dlog, derror } = createDebugHelpers(DEBUG_MODE);
|
||||||
|
|
||||||
// IF-LGSP-339 : 회원 다운로드 쿠폰 정보 조회
|
// IF-LGSP-339 : 회원 다운로드 쿠폰 정보 조회
|
||||||
export const getProductCouponInfo = (props) => (dispatch, getState) => {
|
export const getProductCouponInfo = (props) => (dispatch, getState) => {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import css from './UserReviewPanel.module.less';
|
|||||||
|
|
||||||
// 디버그 헬퍼 설정
|
// 디버그 헬퍼 설정
|
||||||
const DEBUG_MODE = false;
|
const DEBUG_MODE = false;
|
||||||
const { dlog, dwarn, derror } = createDebugHelpers(DEBUG_MODE);
|
const { dlog, dwarn, derror /* eslint-disable-line no-unused-vars */ } = createDebugHelpers(DEBUG_MODE);
|
||||||
|
|
||||||
// 버전에 따른 UI 설정
|
// 버전에 따른 UI 설정
|
||||||
const VERSION_LABEL = REVIEW_VERSION === 1 ? '[v1 - 기존 API]' : '[v2 - 신 API]';
|
const VERSION_LABEL = REVIEW_VERSION === 1 ? '[v1 - 기존 API]' : '[v2 - 신 API]';
|
||||||
@@ -41,8 +41,8 @@ const UserReviewPanel = ({ className, panelInfo, spotlightId }) => {
|
|||||||
userReviewPanelTotalPages,
|
userReviewPanelTotalPages,
|
||||||
goToNextUserReviewPage,
|
goToNextUserReviewPage,
|
||||||
goToPrevUserReviewPage,
|
goToPrevUserReviewPage,
|
||||||
applyRatingFilter,
|
applyRatingFilter, // eslint-disable-line no-unused-vars
|
||||||
applySentimentFilter,
|
applySentimentFilter, // eslint-disable-line no-unused-vars
|
||||||
clearAllFilters,
|
clearAllFilters,
|
||||||
currentFilter,
|
currentFilter,
|
||||||
filterCounts,
|
filterCounts,
|
||||||
@@ -50,10 +50,10 @@ const UserReviewPanel = ({ className, panelInfo, spotlightId }) => {
|
|||||||
_debug,
|
_debug,
|
||||||
// 🎯 API 기반 필터링 데이터
|
// 🎯 API 기반 필터링 데이터
|
||||||
filters,
|
filters,
|
||||||
filteredReviewListData,
|
filteredReviewListData, // eslint-disable-line no-unused-vars
|
||||||
currentReviewFilter,
|
currentReviewFilter,
|
||||||
// 전체 리뷰 데이터 (팝업용)
|
// 전체 리뷰 데이터 (팝업용)
|
||||||
allReviews,
|
allReviews, // eslint-disable-line no-unused-vars
|
||||||
filteredReviews, // ✅ 필터링된 전체 리뷰 (팝업에서 사용)
|
filteredReviews, // ✅ 필터링된 전체 리뷰 (팝업에서 사용)
|
||||||
getReviewsWithImages,
|
getReviewsWithImages,
|
||||||
extractImagesFromReviews,
|
extractImagesFromReviews,
|
||||||
@@ -226,7 +226,15 @@ const UserReviewPanel = ({ className, panelInfo, spotlightId }) => {
|
|||||||
return sentimentMap;
|
return sentimentMap;
|
||||||
}, [filters]);
|
}, [filters]);
|
||||||
|
|
||||||
// API 기반 별점 필터 핸들러
|
const getApiKeywordClickHandler = useCallback(
|
||||||
|
(keywordValue) => () => handleApiKeywordsFilter(keywordValue),
|
||||||
|
[handleApiKeywordsFilter]
|
||||||
|
);
|
||||||
|
|
||||||
|
const getApiSentimentClickHandler = useCallback(
|
||||||
|
(sentimentValue) => () => handleApiSentimentFilter(sentimentValue),
|
||||||
|
[handleApiSentimentFilter]
|
||||||
|
);
|
||||||
const handleApiRatingFilter = useCallback(
|
const handleApiRatingFilter = useCallback(
|
||||||
(rating) => {
|
(rating) => {
|
||||||
if (!prdtId || !patnrId) {
|
if (!prdtId || !patnrId) {
|
||||||
@@ -621,7 +629,7 @@ const UserReviewPanel = ({ className, panelInfo, spotlightId }) => {
|
|||||||
<FilterItemButton
|
<FilterItemButton
|
||||||
key={keyword.filterTpVal}
|
key={keyword.filterTpVal}
|
||||||
text={`${keyword.filterNm} (${keyword.filterNmCnt})`}
|
text={`${keyword.filterNm} (${keyword.filterNmCnt})`}
|
||||||
onClick={() => handleApiKeywordsFilter(keyword.filterTpVal)}
|
onClick={getApiKeywordClickHandler(keyword.filterTpVal)}
|
||||||
spotlightId={`filter-keyword-${index}`}
|
spotlightId={`filter-keyword-${index}`}
|
||||||
ariaLabel={`Filter by ${keyword.filterNm} keyword`}
|
ariaLabel={`Filter by ${keyword.filterNm} keyword`}
|
||||||
dataSpotlightUp={
|
dataSpotlightUp={
|
||||||
@@ -693,7 +701,7 @@ const UserReviewPanel = ({ className, panelInfo, spotlightId }) => {
|
|||||||
<FilterItemButton
|
<FilterItemButton
|
||||||
key={sentiment}
|
key={sentiment}
|
||||||
text={`${sentiment.charAt(0).toUpperCase() + sentiment.slice(1)} (${count})`}
|
text={`${sentiment.charAt(0).toUpperCase() + sentiment.slice(1)} (${count})`}
|
||||||
onClick={() => handleApiSentimentFilter(sentiment)}
|
onClick={getApiSentimentClickHandler(sentiment)}
|
||||||
spotlightId={`filter-sentiment-${sentiment}`}
|
spotlightId={`filter-sentiment-${sentiment}`}
|
||||||
ariaLabel={`Filter by ${sentiment} sentiment`}
|
ariaLabel={`Filter by ${sentiment} sentiment`}
|
||||||
dataSpotlightUp={
|
dataSpotlightUp={
|
||||||
|
|||||||
Reference in New Issue
Block a user