diff --git a/com.twin.app.shoptime/src/views/MainView/MainView.jsx b/com.twin.app.shoptime/src/views/MainView/MainView.jsx index 44a00a4e..dc7b5a21 100644 --- a/com.twin.app.shoptime/src/views/MainView/MainView.jsx +++ b/com.twin.app.shoptime/src/views/MainView/MainView.jsx @@ -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); }