vertical pagenator
This commit is contained in:
@@ -12,8 +12,7 @@ import TItemCard from "../../../components/TItemCard/TItemCard";
|
||||
import TScroller from "../../../components/TScroller/TScroller";
|
||||
import useScrollReset from "../../../hooks/useScrollReset";
|
||||
import useScrollTo from "../../../hooks/useScrollTo";
|
||||
import useScrollTopByDistance from "../../../hooks/useScrollTopByDistance";
|
||||
import { LOG_MENU, panel_names } from "../../../utils/Config";
|
||||
import { panel_names } from "../../../utils/Config";
|
||||
import { $L, scaleW } from "../../../utils/helperMethods";
|
||||
import css from "./BestSeller.module.less";
|
||||
|
||||
@@ -23,13 +22,12 @@ const Container = SpotlightContainerDecorator(
|
||||
"div"
|
||||
);
|
||||
|
||||
const BestSeller = ({ order, scrollTopBody, handleItemFocus }) => {
|
||||
const BestSeller = ({ order, scrollTopBody, spotlightId, handleItemFocus }) => {
|
||||
const { getScrollTo, scrollLeft } = useScrollTo();
|
||||
const { handleScrollReset, handleStopScrolling } = useScrollReset(
|
||||
scrollLeft,
|
||||
true
|
||||
);
|
||||
const { scrollTopByDistance } = useScrollTopByDistance();
|
||||
|
||||
const dispatch = useDispatch();
|
||||
|
||||
@@ -90,20 +88,12 @@ const BestSeller = ({ order, scrollTopBody, handleItemFocus }) => {
|
||||
if (cursorVisible) {
|
||||
return;
|
||||
}
|
||||
|
||||
scrollTopByDistance(
|
||||
`[data-marker="scroll-marker"]`,
|
||||
`[data-title-index="homeBestSellerTitle"]`,
|
||||
scrollTopBody,
|
||||
36
|
||||
);
|
||||
},
|
||||
[
|
||||
cursorVisible,
|
||||
_handleItemFocus,
|
||||
handleScrollReset,
|
||||
scrollTopBody,
|
||||
scrollTopByDistance,
|
||||
scrollTopBody
|
||||
]
|
||||
);
|
||||
|
||||
@@ -118,12 +108,12 @@ const BestSeller = ({ order, scrollTopBody, handleItemFocus }) => {
|
||||
|
||||
const _handleItemFocus = useCallback(() => {
|
||||
if (handleItemFocus) {
|
||||
handleItemFocus(LOG_MENU.HOME_BEST_SELLER);
|
||||
handleItemFocus();
|
||||
}
|
||||
}, [handleItemFocus]);
|
||||
|
||||
return (
|
||||
<Container className={css.bestSellerWrap} style={orderStyle}>
|
||||
<Container className={css.bestSellerWrap} style={orderStyle} spotlightId={spotlightId}>
|
||||
<SectionTitle
|
||||
title={$L("BEST SELLER")}
|
||||
data-title-index="homeBestSellerTitle"
|
||||
|
||||
Reference in New Issue
Block a user