diff --git a/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx b/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx index 661b66ae..68d0846e 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx @@ -93,9 +93,7 @@ const BestSeller = ({ order, scrollTopBody, panelInfo }) => { const orderStyle = useMemo(() => ({ order: order }), [order]); const handleScrollRight = (e) => { const container = e.currentTarget?.parentNode; - const gap = 18; - const padding = 60; - const x = container.scrollWidth - (container.clientWidth + padding - gap); + const x = container.scrollWidth - container.clientWidth; setTimeout(() => { scrollLeft({ x, animate: true }); diff --git a/com.twin.app.shoptime/src/views/HomePanel/HomeOnSale/HomeOnSale.jsx b/com.twin.app.shoptime/src/views/HomePanel/HomeOnSale/HomeOnSale.jsx index c0094a46..86083065 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/HomeOnSale/HomeOnSale.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/HomeOnSale/HomeOnSale.jsx @@ -33,9 +33,9 @@ const HomeOnSale = ({ order, scrollTopBody, ...rest }) => { const homeOnSaleInfosLength = homeOnSaleInfos?.length; const handleScrollRight = (e) => { const container = e.currentTarget?.parentNode; - const gap = 18; - const padding = 0; - const x = container.scrollWidth - (container.clientWidth + padding - gap); + const gap = 60; + + const x = container.scrollWidth - container.clientWidth + gap; setTimeout(() => { scrollLeft({ x, animate: true }); diff --git a/com.twin.app.shoptime/src/views/HomePanel/HomeOnSale/HomeOnSale.module.less b/com.twin.app.shoptime/src/views/HomePanel/HomeOnSale/HomeOnSale.module.less index 056fc4c0..9be40cc7 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/HomeOnSale/HomeOnSale.module.less +++ b/com.twin.app.shoptime/src/views/HomePanel/HomeOnSale/HomeOnSale.module.less @@ -50,6 +50,9 @@ background: linear-gradient(0.4turn, #a387ea, #7750dc); } } + &:last-child { + margin-right: 60px; + } } } } diff --git a/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx b/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx index 7389a6f7..0e667e46 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx @@ -93,9 +93,7 @@ const PopularShow = ({ homeChk = true, order, scrollTopBody, ...rest }) => { const orderStyle = useMemo(() => ({ order: order }), [order]); const handleScrollRight = (e) => { const container = e.currentTarget?.parentNode; - const gap = 18; - const padding = 60; - const x = container.scrollWidth - (container.clientWidth + padding - gap); + const x = container.scrollWidth - container.clientWidth; setTimeout(() => { scrollLeft({ x, animate: true }); diff --git a/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx b/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx index 9d693332..0a6a768b 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx @@ -176,9 +176,8 @@ const SubCategory = ({ order, scrollTopBody, catCd }) => { const handleScrollRight = (e) => { const container = e.currentTarget?.parentNode; - const gap = 18; - const padding = 60; - const x = container.scrollWidth - (container.clientWidth + padding - gap); + + const x = container.scrollWidth - container.clientWidth; setTimeout(() => { scrollLeft({ x, animate: true });