[251126] fix: Log Migration - SearchPanel.new.v2.jsx

🕐 커밋 시간: 2025. 11. 26. 14:16:12

📊 변경 통계:
  • 총 파일: 4개
  • 추가: +51줄
  • 삭제: -81줄

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/App/App.js
  ~ com.twin.app.shoptime/src/actions/commonActions.js
  ~ com.twin.app.shoptime/src/api/TAxios.js
  ~ com.twin.app.shoptime/src/views/SearchPanel/SearchPanel.new.v2.jsx

🔧 주요 변경 내용:
  • 핵심 비즈니스 로직 개선
  • API 서비스 레이어 개선
  • 소규모 기능 개선
  • 코드 정리 및 최적화

Performance: 코드 최적화로 성능 개선 기대
This commit is contained in:
2025-11-26 14:16:13 +09:00
parent 3add749c07
commit 4904c6fb58
4 changed files with 50 additions and 80 deletions

View File

@@ -1987,35 +1987,25 @@ export default function SearchPanel({ panelInfo, isOnTop, spotlightId }) {
/**
* LOG 용도,
* 검색 시 로그를 보내는 용도의 이펙트
* 우선 주석처리 (계속보내는부분에 대한 처리 필요)
*/
// useEffect(() => {
// const result = Object.values(searchDatas).reduce((acc, curr) => {
// return acc + curr.length;
// }, 0);
useEffect(() => {
const result = Object.values(searchDatas).reduce((acc, curr) => {
return acc + curr.length;
}, 0);
// if (searchQuery) {
// dispatch(
// sendLogTotalRecommend({
// query: searchQuery,
// searchType: searchPerformed ? 'query' : 'keyword',
// result: result,
// contextName: LOG_CONTEXT_NAME.SEARCH,
// messageId: LOG_MESSAGE_ID.SEARCH_ITEM,
// })
// );
// // 검색 완료 후 결과에 따른 Toast 표시
// // if (searchPerformed && searchQuery.trim()) {
// // if (result > 0) {
// // dispatch(showSearchSuccessToast(searchQuery, result));
// // } else {
// // dispatch(showSearchErrorToast(searchQuery));
// // }
// // }
// }
// // eslint-disable-next-line react-hooks/exhaustive-deps
// }, [searchDatas, searchPerformed, searchQuery]);
if (searchQuery) {
dispatch(
sendLogTotalRecommend({
query: searchQuery,
searchType: searchPerformed ? 'query' : 'keyword',
result: result,
contextName: LOG_CONTEXT_NAME.SEARCH,
messageId: LOG_MESSAGE_ID.SEARCH_ITEM,
})
);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [searchDatas, searchPerformed, searchQuery]);
/**
* clean up 용도