SHOPTIME-5890 popular show 진입 후 이전버튼 home 진입시 포커스 상이
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user