[251025] fix: SearchPanel.new.v2 초기화문제 해결

🕐 커밋 시간: 2025. 10. 25. 05:02:49

📊 변경 통계:
  • 총 파일: 1개
  • 추가: +7줄

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/components/TabLayout/TabLayout.jsx

🔧 주요 변경 내용:
  • UI 컴포넌트 아키텍처 개선
This commit is contained in:
2025-10-25 05:02:50 +09:00
parent 2ebf118875
commit 8fe080f343

View File

@@ -18,6 +18,7 @@ import shoptimeFullIcon from '../../../assets/images/icons/ic-lnb-logo-shoptime@
import { gnbOpened } from '../../actions/commonActions';
import { checkEnterThroughGNB, resetHomeInfo } from '../../actions/homeActions';
import { resetPanels } from '../../actions/panelActions';
import { clearShopperHouseData } from '../../actions/searchActions';
import usePrevious from '../../hooks/usePrevious';
import useScrollTo from '../../hooks/useScrollTo';
import { panel_names } from '../../utils/Config';
@@ -532,6 +533,12 @@ export default function TabLayout({ topPanelName, onTabActivated, panelInfo }) {
//그 외 나머지
if (target) {
deActivateTab();
// ✨ GNB를 통해 Search 패널로 전환 시에만 shopperHouseData 정리
if (target[0]?.name === panel_names.SEARCH_PANEL) {
dispatch(clearShopperHouseData());
}
dispatch(resetPanels(target));
panelSwitching.current = true;
panelSwitchingJob.start(panelSwitching);