[HomePanel] 더보기 버튼 포커싱 관련 처리건

- 정보들어올때 그려주는식으로 변경.
This commit is contained in:
junghoon86.park
2024-02-22 19:11:41 +09:00
parent 95ca999351
commit 9ab8a812d4
3 changed files with 39 additions and 25 deletions

View File

@@ -1,4 +1,4 @@
import React from "react";
import React, { useEffect, useState } from "react";
import { useSelector } from "react-redux";
@@ -23,11 +23,15 @@ const BestSeller = () => {
const bestSellerDatas = useSelector(
(state) => state.product.bestSellerData.bestSeller
);
const [drawChk, setDrawChk] = useState(false);
const { getScrollTo, scrollLeft } = useScrollTo();
const { handleScrollReset, handleStopScrolling } = useScrollReset(
scrollLeft,
true
);
useEffect(() => {
setDrawChk(true);
}, [bestSellerDatas]);
return (
<Container className={css.bestSellerWrap}>
<SectionTitle title={$L(`BEST SELLER`)} />
@@ -53,7 +57,9 @@ const BestSeller = () => {
/>
))}
<SpottableComponent className={css.addItem}></SpottableComponent>
{drawChk && (
<SpottableComponent className={css.addItem}></SpottableComponent>
)}
</TScroller>
</Container>
);