[TrendingNowPanel] BestSeller 인덱스 0번째 상품 포커스 오류 해결
This commit is contained in:
@@ -9,9 +9,7 @@ import { pushPanel, updatePanel } from "../../actions/panelActions";
|
||||
import SectionTitle from "../../components/SectionTitle/SectionTitle";
|
||||
import TBody from "../../components/TBody/TBody";
|
||||
import TButton, { TYPES } from "../../components/TButton/TButton";
|
||||
import TItemCard, {
|
||||
removeDotAndColon,
|
||||
} from "../../components/TItemCard/TItemCard";
|
||||
import TItemCard from "../../components/TItemCard/TItemCard";
|
||||
import TPanel from "../../components/TPanel/TPanel";
|
||||
import useScrollReset from "../../hooks/useScrollReset";
|
||||
import useScrollTo from "../../hooks/useScrollTo";
|
||||
@@ -69,9 +67,11 @@ export default function TrendingNowPanel({ panelInfo }) {
|
||||
Spotlight.focus(targetId);
|
||||
}, 0);
|
||||
}, [targetId]);
|
||||
|
||||
const handleTopButtonClick = useCallback(() => {
|
||||
scrollTop();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (panelInfo.currentSpot) {
|
||||
Spotlight.focus(panelInfo.currentSpot);
|
||||
@@ -92,6 +92,7 @@ export default function TrendingNowPanel({ panelInfo }) {
|
||||
);
|
||||
};
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (!firstChk && !panelInfo.currentSpot) {
|
||||
Spotlight.focus("popular_video");
|
||||
@@ -118,7 +119,6 @@ export default function TrendingNowPanel({ panelInfo }) {
|
||||
productName={item.prdtNm}
|
||||
isBestSeller={true}
|
||||
rank={item.rankOrd}
|
||||
onFocus={index === 0 ? handleScrollReset : null}
|
||||
onBlur={handleStopScrolling}
|
||||
onClick={() => handleCardClick(item)}
|
||||
offerInfo={item.offerInfo}
|
||||
|
||||
Reference in New Issue
Block a user