SHOPTIME-5890 popular show 진입 후 이전버튼 home 진입시 포커스 상이

This commit is contained in:
opacity@t-win.kr
2025-11-03 10:44:44 +09:00
parent ef2b373d77
commit 02a09f5be2

View File

@@ -40,7 +40,6 @@ import TPanel from "../../components/TPanel/TPanel";
import TPopUp from "../../components/TPopUp/TPopUp";
import TVerticalPagenator from "../../components/TVerticalPagenator/TVerticalPagenator";
import useDebugKey from "../../hooks/useDebugKey";
import usePrevious from "../../hooks/usePrevious";
import {
ACTIVE_POPUP,
LOG_CONTEXT_NAME,
@@ -164,8 +163,6 @@ const HomePanel = ({ isOnTop }) => {
const cbChangePageRef = useRef(null);
const focusedContainerIdRef = usePrevious(focusedContainerId);
const loadingComplete = useSelector((state) => state.common?.loadingComplete);
const onCancel = useCallback(() => {
@@ -565,10 +562,14 @@ const HomePanel = ({ isOnTop }) => {
}, [dispatch]);
useEffect(() => {
if (isOnTop && panelInfo?.lastFocusedTargetId) {
if (
isOnTop &&
panelInfo?.lastFocusedTargetId &&
!panelInfo?.focusedContainerId
) {
Spotlight.focus(panelInfo.lastFocusedTargetId);
}
}, [isOnTop]);
}, [isOnTop, panelInfo?.lastFocusedTargetId, panelInfo?.focusedContainerId]);
useEffect(() => {
return () => {
@@ -595,12 +596,12 @@ const HomePanel = ({ isOnTop }) => {
currentSpot: currentSpot,
currentCatCd: targetSpotlightCatcd,
currentCateName: targetSpotlightCateNm,
focusedContainerId: focusedContainerIdRef.current,
focusedContainerId: focusedContainerId,
},
})
);
};
}, [dispatch]);
}, [dispatch, focusedContainerId]);
const handleArrowClick = useCallback(() => {
if (verticalPagenatorRef.current) {