[251216] fix: TrendingNowPanel 3-layer add
🕐 커밋 시간: 2025. 12. 16. 10:26:10 📊 변경 통계: • 총 파일: 1개 • 추가: +13줄 • 삭제: -2줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/views/MainView/MainView.jsx
This commit is contained in:
@@ -209,6 +209,9 @@ export default function MainView({ className, initService }) {
|
||||
const hasFeaturedBrandsPanel = panels.some(
|
||||
(panel) => panel?.name === Config.panel_names.FEATURED_BRANDS_PANEL
|
||||
);
|
||||
const hasTrendingNowPanel = panels.some(
|
||||
(panel) => panel?.name === Config.panel_names.TRENDING_NOW_PANEL
|
||||
);
|
||||
// 단독 패널 체크 - CheckOutPanel, CartPanel 등 단독으로 렌더링되어야 하는 패널들
|
||||
if (DEBUG_MODE) {
|
||||
console.log(`[PANEL_MainView] 🔍 Top panel name: ${topPanel?.name}`);
|
||||
@@ -250,7 +253,11 @@ export default function MainView({ className, initService }) {
|
||||
'[MainView] Rendering 3-layer structure: PlayerPanel + DetailPanel + MediaPanel'
|
||||
);
|
||||
}
|
||||
renderingPanels = hasFeaturedBrandsPanel ? panels.slice(-4) : panels.slice(-3);
|
||||
if (hasFeaturedBrandsPanel || hasTrendingNowPanel) {
|
||||
renderingPanels = panels.slice(-4);
|
||||
} else {
|
||||
renderingPanels = panels.slice(-3);
|
||||
}
|
||||
} else if (
|
||||
panels[panels.length - 1]?.name === Config.panel_names.PLAYER_PANEL ||
|
||||
panels[panels.length - 1]?.name === Config.panel_names.PLAYER_PANEL_NEW ||
|
||||
@@ -258,7 +265,11 @@ export default function MainView({ className, initService }) {
|
||||
panels[panels.length - 2]?.name === Config.panel_names.PLAYER_PANEL ||
|
||||
panels[panels.length - 2]?.name === Config.panel_names.MEDIA_PANEL
|
||||
) {
|
||||
renderingPanels = hasFeaturedBrandsPanel ? panels.slice(-3) : panels.slice(-2);
|
||||
if (hasFeaturedBrandsPanel || hasTrendingNowPanel) {
|
||||
renderingPanels = panels.slice(-3);
|
||||
} else {
|
||||
renderingPanels = panels.slice(-2);
|
||||
}
|
||||
} else {
|
||||
renderingPanels = panels.slice(-1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user