[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:
@@ -45,7 +45,7 @@ import { pushPanel } from '../actions/panelActions';
|
||||
import { enqueuePanelHistory } from '../actions/panelHistoryActions';
|
||||
import NotSupportedVersion from '../components/NotSupportedVersion/NotSupportedVersion';
|
||||
import ToastContainer from '../components/TToast/ToastContainer';
|
||||
import GlobalPopup from '../components/GlobalPopup/GlobalPopup';
|
||||
|
||||
import usePrevious from '../hooks/usePrevious';
|
||||
import { lunaTest } from '../lunaSend/lunaTest';
|
||||
import { store } from '../store/store';
|
||||
@@ -407,28 +407,7 @@ Spotlight.silentlyFocus = function (...args) {
|
||||
return ret;
|
||||
};
|
||||
|
||||
const resolveSpotlightIdFromEvent = (event) => {
|
||||
if (!event) return undefined;
|
||||
const { detail, target } = event;
|
||||
|
||||
if (detail) {
|
||||
if (detail.spotlightId) {
|
||||
return detail.spotlightId;
|
||||
}
|
||||
if (detail.id) {
|
||||
return detail.id;
|
||||
}
|
||||
if (detail.target && detail.target.dataset && detail.target.dataset.spotlightId) {
|
||||
return detail.target.dataset.spotlightId;
|
||||
}
|
||||
}
|
||||
|
||||
if (target && target.dataset && target.dataset.spotlightId) {
|
||||
return target.dataset.spotlightId;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
// Spotlight Focus 추적 로그 [251115]
|
||||
// DOM 이벤트 리스너로 대체
|
||||
@@ -448,7 +427,7 @@ const resolveSpotlightIdFromEvent = (event) => {
|
||||
// });
|
||||
// }
|
||||
|
||||
function AppBase(props) {
|
||||
function AppBase(_props) {
|
||||
const dispatch = useDispatch();
|
||||
const httpHeader = useSelector((state) => state.common.httpHeader);
|
||||
const httpHeaderRef = useRef(httpHeader);
|
||||
@@ -650,7 +629,7 @@ function AppBase(props) {
|
||||
clearLaunchParams();
|
||||
}
|
||||
},
|
||||
[dispatch]
|
||||
[/* dispatch */]
|
||||
);
|
||||
|
||||
const handleRelaunchEvent = useCallback(() => {
|
||||
@@ -704,7 +683,7 @@ function AppBase(props) {
|
||||
if (typeof window === 'object' && window.PalmSystem) {
|
||||
window.PalmSystem.activate();
|
||||
}
|
||||
}, [initService, introTermsAgreeRef, dispatch]);
|
||||
}, [initService, introTermsAgreeRef /*, dispatch */]);
|
||||
|
||||
const visibilityChanged = useCallback(() => {
|
||||
// console.log('document is hidden', document.hidden);
|
||||
@@ -748,7 +727,7 @@ function AppBase(props) {
|
||||
}, [dispatch]);
|
||||
|
||||
useEffect(() => {
|
||||
const keyDownEvent = (event) => {
|
||||
const keyDownEvent = (_event) => {
|
||||
dispatch(changeAppStatus({ cursorVisible: false }));
|
||||
Spotlight.setPointerMode(false);
|
||||
};
|
||||
@@ -757,7 +736,7 @@ function AppBase(props) {
|
||||
let lastMoveTime = 0;
|
||||
const THROTTLE_MS = 100;
|
||||
|
||||
const mouseMoveEvent = (event) => {
|
||||
const mouseMoveEvent = (_event) => {
|
||||
const now = Date.now();
|
||||
if (now - lastMoveTime < THROTTLE_MS) {
|
||||
// throttle 기간 내에는 hideCursor만 재시작
|
||||
@@ -810,9 +789,7 @@ function AppBase(props) {
|
||||
let userDataChanged = false;
|
||||
if (JSON.stringify(loginUserDataRef.current) !== JSON.stringify(loginUserData)) {
|
||||
userDataChanged = true;
|
||||
}
|
||||
if (!httpHeader || !deviceId) {
|
||||
} else if (userDataChanged || httpHeaderRef.current === null) {
|
||||
} else if (userDataChanged || httpHeaderRef.current === null) {
|
||||
//계정정보 변경시 또는 초기 로딩시
|
||||
if (!httpHeader) {
|
||||
dispatch(
|
||||
|
||||
Reference in New Issue
Block a user