[Home] setTimeout 삭제
Detail Notes : 1. Top 버튼 클릭시 setTimeout을 제거 후 테스트 결과 정상 작동하여 제거함
This commit is contained in:
@@ -36,7 +36,6 @@ export default function HomePanel({ isOnTop }) {
|
||||
const popupVisible = useSelector((state) => state.common.popup.popupVisible);
|
||||
const [selectTemplate, setSelectTemplate] = useState(null);
|
||||
const [homeLayoutInfoDetail, setHomeLayoutInfoDetail] = useState([]);
|
||||
const timerRef = useRef();
|
||||
useEffect(() => {
|
||||
if (homeTopDisplayInfos) {
|
||||
setSelectTemplate(homeTopDisplayInfos[0].shptmTmplCd);
|
||||
@@ -62,10 +61,6 @@ export default function HomePanel({ isOnTop }) {
|
||||
dispatch(setHidePopup());
|
||||
}, [dispatch]);
|
||||
|
||||
useEffect(() => {
|
||||
return () => clearTimeout(timerRef.current);
|
||||
}, []);
|
||||
|
||||
const handleTopButtonClick = useCallback(() => {
|
||||
scrollTop();
|
||||
|
||||
@@ -76,7 +71,7 @@ export default function HomePanel({ isOnTop }) {
|
||||
spotId = "banner01";
|
||||
}
|
||||
|
||||
timerRef.current = setTimeout(() => Spotlight.focus(spotId), 0);
|
||||
Spotlight.focus(spotId);
|
||||
}, [scrollTop]);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user