[251102] fix: CartPanel mock-1

🕐 커밋 시간: 2025. 11. 02. 08:49:45

📊 변경 통계:
  • 총 파일: 12개
  • 추가: +686줄
  • 삭제: -88줄

📁 추가된 파일:
  + com.twin.app.shoptime/src/reducers/mockCartReducer.js

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/components/VideoPlayer/TReactPlayer.jsx
  ~ com.twin.app.shoptime/src/store/store.js
  ~ com.twin.app.shoptime/src/utils/BuyNowDataManipulator.js
  ~ com.twin.app.shoptime/src/utils/Config.js
  ~ com.twin.app.shoptime/src/utils/mockDataSafetyUtils.js
  ~ com.twin.app.shoptime/src/views/CartPanel/CartPanel.jsx
  ~ com.twin.app.shoptime/src/views/CartPanel/CartProduct.jsx
  ~ com.twin.app.shoptime/src/views/CartPanel/CartProductBar.jsx
  ~ com.twin.app.shoptime/src/views/CartPanel/CartSidebar.jsx
  ~ com.twin.app.shoptime/src/views/DetailPanel/components/BuyOption.jsx
  ~ com.twin.app.shoptime/src/views/MainView/MainView.jsx

🔧 주요 변경 내용:
  • UI 컴포넌트 아키텍처 개선
  • 핵심 비즈니스 로직 개선
  • 공통 유틸리티 함수 최적화
  • 대규모 기능 개발
  • 모듈 구조 개선
This commit is contained in:
2025-11-02 08:49:51 +09:00
parent dda368ab65
commit efeb45823e
12 changed files with 964 additions and 94 deletions

View File

@@ -46,7 +46,7 @@ import TNewPopUp from '../../components/TPopUp/TNewPopUp';
import TPopUp from '../../components/TPopUp/TPopUp';
import usePrevious from '../../hooks/usePrevious';
import * as Config from '../../utils/Config';
import { panel_names } from '../../utils/Config';
import { panel_names, STANDALONE_PANELS, isStandalonePanel } from '../../utils/Config';
import { $L, getErrorMessage, getSpottableDescendants } from '../../utils/helperMethods';
import { BUYNOW_CONFIG } from '../../utils/BuyNowConfig';
import { SpotlightIds } from '../../utils/SpotlightIds';
@@ -200,10 +200,10 @@ export default function MainView({ className, initService }) {
const topPanel = panels[panels.length - 1];
// CheckOutPanel은 독립적으로 항상 단독 렌더링
if (topPanel?.name === Config.panel_names.CHECKOUT_PANEL) {
console.log('[MainView] CheckOutPanel detected - rendering independently');
renderingPanels = [topPanel]; // CheckOutPanel만 단독으로 렌더링
// 단독 패널 체크 - CheckOutPanel, CartPanel 등 단독으로 렌더링되어야 하는 패널들
if (isStandalonePanel(topPanel?.name)) {
console.log(`[MainView] Standalone panel detected: ${topPanel?.name} - rendering independently`);
renderingPanels = [topPanel]; // 단독 패널만 단독으로 렌더링
}
// 기존 3-layer 구조 체크: PlayerPanel + DetailPanel + MediaPanel(modal)
else {
@@ -248,10 +248,10 @@ export default function MainView({ className, initService }) {
const Component = panelMap[panel.name];
let isPanelOnTop = false;
// CheckOutPanel은 항상 onTop
if (panel.name === Config.panel_names.CHECKOUT_PANEL) {
// 단독 패널은 항상 onTop
if (isStandalonePanel(panel.name)) {
isPanelOnTop = true;
console.log('[MainView] CheckOutPanel is always onTop');
console.log(`[MainView] Standalone panel ${panel.name} is always onTop`);
}
// 3-layer 케이스: 중간 패널(DetailPanel)이 onTop
else if (renderingPanels.length === 3) {