[251031] refactor: add [UserReviewPanel] prefix to pagination logs for console filtering

Changed all console.log/warn statements in fetchAllReviewsWithSequentialPaging
function to use consistent [UserReviewPanel] prefix. This allows filtering
console output by component during development and debugging of the API-based
review filtering feature.

- 8 log statements updated with [UserReviewPanel] prefix
- Enables efficient console debugging for review pagination
- Maintains readability with existing emoji indicators
This commit is contained in:
2025-10-31 13:43:21 +09:00
parent 89d1785c0b
commit 8fb07d6df0

View File

@@ -320,7 +320,7 @@ const fetchAllReviewsWithSequentialPaging = async (dispatch, getState, requestPa
pageSize = 100, // 최대값으로 설정하여 페이징 횟수 최소화
} = requestParams;
console.log('[fetchAllReviewsWithSequentialPaging] 🚀 순차 페이징 시작:', {
console.log('[UserReviewPanel] 🚀 순차 페이징 시작:', {
prdtId,
patnrId,
filterTpCd,
@@ -348,7 +348,7 @@ const fetchAllReviewsWithSequentialPaging = async (dispatch, getState, requestPa
// filterTpCd가 'ALL'이 아니면 filterTpVal 추가
if (filterTpCd !== 'ALL') {
if (!filterTpVal) {
console.warn('[fetchAllReviewsWithSequentialPaging] ⚠️ filterTpCd가 ALL이 아니면 filterTpVal은 필수입니다');
console.warn('[UserReviewPanel] ⚠️ filterTpCd가 ALL이 아니면 filterTpVal은 필수입니다');
}
params.filterTpVal = filterTpVal;
}
@@ -360,7 +360,7 @@ const fetchAllReviewsWithSequentialPaging = async (dispatch, getState, requestPa
TAxios(dispatch, getState, 'get', URLS.GET_USER_REVIEW_LIST, params, {}, onSuccess, onFail);
});
console.log(`[fetchAllReviewsWithSequentialPaging] 📄 페이지 ${pageNo} 응답:`, {
console.log(`[UserReviewPanel] 📄 페이지 ${pageNo} 응답:`, {
pageNo,
reviewListLength: response.data?.data?.reviewDetail?.reviewList?.length || 0,
totRvwCnt: response.data?.data?.reviewDetail?.totRvwCnt,
@@ -371,7 +371,7 @@ const fetchAllReviewsWithSequentialPaging = async (dispatch, getState, requestPa
const reviewData = extractReviewListApiData(response.data);
if (!reviewData || !reviewData.reviewList) {
console.warn('[fetchAllReviewsWithSequentialPaging] ⚠️ 리뷰 데이터 추출 실패, 페이징 종료');
console.warn('[UserReviewPanel] ⚠️ 리뷰 데이터 추출 실패, 페이징 종료');
break;
}
@@ -383,7 +383,7 @@ const fetchAllReviewsWithSequentialPaging = async (dispatch, getState, requestPa
// 5. 현재 페이지의 리뷰들을 전체 리스트에 추가
allReviews = allReviews.concat(reviewData.reviewList);
console.log(`[fetchAllReviewsWithSequentialPaging] ✅ 페이지 ${pageNo} 수집 완료:`, {
console.log(`[UserReviewPanel] ✅ 페이지 ${pageNo} 수집 완료:`, {
pageNo,
currentPageCount: reviewData.reviewList.length,
totalCollected: allReviews.length,
@@ -398,7 +398,7 @@ const fetchAllReviewsWithSequentialPaging = async (dispatch, getState, requestPa
if (receivedCount < pageSize || allReviews.length >= totalReviews) {
hasMore = false;
console.log('[fetchAllReviewsWithSequentialPaging] 📊 페이징 종료:', {
console.log('[UserReviewPanel] 📊 페이징 종료:', {
reason: receivedCount < pageSize ? '받은 개수 < pageSize' : '수집된 개수 >= 총 개수',
receivedCount,
pageSize,
@@ -411,7 +411,7 @@ const fetchAllReviewsWithSequentialPaging = async (dispatch, getState, requestPa
}
// 7. 모든 리뷰 수집 완료, Redux에 디스패치
console.log('[fetchAllReviewsWithSequentialPaging] 🎉 모든 리뷰 수집 완료:', {
console.log('[UserReviewPanel] 🎉 모든 리뷰 수집 완료:', {
totalCollected: allReviews.length,
totRvwCnt: currentReviewDetail?.totRvwCnt,
pages: pageNo - 1
@@ -433,7 +433,7 @@ const fetchAllReviewsWithSequentialPaging = async (dispatch, getState, requestPa
payload: finalPayload
};
console.log('[fetchAllReviewsWithSequentialPaging] 📦 Redux 디스패치:', {
console.log('[UserReviewPanel] 📦 Redux 디스패치:', {
actionType,
totalReviews: allReviews.length,
totRvwCnt: currentReviewDetail?.totRvwCnt,