[251104] fix: UserReviewsPanel Review Filters-2

🕐 커밋 시간: 2025. 11. 04. 12:27:44

📊 변경 통계:
  • 총 파일: 7개
  • 추가: +155줄
  • 삭제: -43줄

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/views/CheckOutPanel/CheckOutPanel.jsx
  ~ com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx
  ~ com.twin.app.shoptime/src/views/DetailPanel/components/BuyOption.jsx
  ~ com.twin.app.shoptime/src/views/UserReview/UserReviewPanel.jsx
  ~ com.twin.app.shoptime/src/views/UserReview/components/FilterItemButton.module.less
  ~ com.twin.app.shoptime/src/views/UserReview/components/UserReviewItem.jsx
  ~ com.twin.app.shoptime/src/views/UserReview/components/UserReviewsList.jsx

🔧 주요 변경 내용:
  • UI 컴포넌트 아키텍처 개선
  • 중간 규모 기능 개선
  • 모듈 구조 개선
This commit is contained in:
2025-11-04 12:27:45 +09:00
parent 74f362bbbc
commit 219582aaf2
7 changed files with 155 additions and 43 deletions

View File

@@ -35,7 +35,7 @@ import {
popPanel,
pushPanel,
} from '../../../actions/panelActions';
import { finishVideoPreview } from '../../../actions/playActions';
import { clearAllVideoTimers } from '../../../actions/playActions';
import {
getProductOption,
getProductOptionId,
@@ -374,8 +374,23 @@ const BuyOption = ({
const { mbrId, prdtId, prodSno } = response.data.productList[0];
const cartTpSno = `${mbrId}_${prdtId}_${prodSno}`;
// dispatch(popPanel(Config.panel_names.DETAIL_PANEL));
dispatch(finishVideoPreview());
dispatch(finishMediaPreview());
clearAllVideoTimers(); // ProductVideoV2의 타이머 정리 (일반 함수 직접 호출)
dispatch(finishMediaPreview()); // MediaPanel 정리
// 🔴 CRITICAL: DetailPanel 뒤에 있을 수 있는 PlayerPanel도 함께 제거 (API Mode)
dispatch((dispatchFn, getState) => {
const panels = getState().panels?.panels || [];
const playerPanelExists = panels.some(p =>
p.name === Config.panel_names.PLAYER_PANEL ||
p.name === Config.panel_names.PLAYER_PANEL_NEW
);
if (playerPanelExists) {
console.log('[BuyOption] ⚠️ API Mode - Found PlayerPanel in stack - removing before checkout');
dispatchFn(popPanel(Config.panel_names.PLAYER_PANEL));
}
});
dispatch(
pushPanel({
name: Config.panel_names.CHECKOUT_PANEL,
@@ -620,10 +635,26 @@ const BuyOption = ({
console.log('[BuyOption] logInfo:', logInfo);
console.log('[BuyOption] Dispatching pushPanel to CHECKOUT_PANEL');
// CheckOutPanel 이동 전에 PlayerPanel/MediaPanel 상태 정리
console.log('[BuyOption] Mock Mode - Cleaning up PlayerPanel/MediaPanel before checkout');
dispatch(finishVideoPreview());
dispatch(finishMediaPreview());
// CheckOutPanel 이동 전에 ProductVideoV2 타이머 및 MediaPanel/PlayerPanel 정리
console.log('[BuyOption] Mock Mode - Cleaning up ProductVideoV2 timers and all media panels before checkout');
clearAllVideoTimers(); // ProductVideoV2의 타이머 정리 (일반 함수 직접 호출)
dispatch(finishMediaPreview()); // MediaPanel 정리
// 🔴 CRITICAL: DetailPanel 뒤에 있을 수 있는 PlayerPanel도 함께 제거
// (finishMediaPreview는 MediaPanel만 처리하므로 PlayerPanel이 남아있을 수 있음)
// dispatch는 thunk function을 받을 수 있으므로, 이를 활용하여 getState로 panels 접근
dispatch((dispatchFn, getState) => {
const panels = getState().panels?.panels || [];
const playerPanelExists = panels.some(p =>
p.name === Config.panel_names.PLAYER_PANEL ||
p.name === Config.panel_names.PLAYER_PANEL_NEW
);
if (playerPanelExists) {
console.log('[BuyOption] ⚠️ Found PlayerPanel in stack - removing before checkout');
dispatchFn(popPanel(Config.panel_names.PLAYER_PANEL));
}
});
// Mock 모드: 선택 상품의 정보를 panelInfo에 담아서 전달
// CheckOutPanel에서 이 정보로 Mock 상품 데이터 생성
@@ -724,7 +755,7 @@ const BuyOption = ({
name: Config.panel_names.CHECKOUT_PANEL,
panelInfo: fallbackPanelInfo,
})
);
);
} else {
// 정상 케이스: checkoutPanelInfo 사용
dispatch(