[OnSalePanel] 불필요 로직 삭제 및 id 수정

Detail Notes :

1.  OnSalePanel, 불필요 로직 삭제
2. OnSaleProductList, “containerId-“ → “onSaleProductListId-“ 수정
This commit is contained in:
younghoon100.park
2024-02-26 13:23:05 +09:00
parent 7279a1caff
commit fafb9b68b6
2 changed files with 4 additions and 9 deletions

View File

@@ -20,7 +20,6 @@ export default function OnSalePanel() {
const dispatch = useDispatch();
const panels = useSelector((state) => state.panels.panels);
const reciveLgCatCd = panels[0].panelInfo?.lgCatCd;
const categoryInfos = useSelector(
(state) => state.onSale.onSaleData.categoryInfos
);
@@ -34,12 +33,8 @@ export default function OnSalePanel() {
const timerRef = useRef();
useEffect(() => {
if (reciveLgCatCd) {
setSelectedLgCatCd(reciveLgCatCd);
} else {
if (categoryInfos && !selectedLgCatCd) {
setSelectedLgCatCd(categoryInfos[0].lgCatCd);
}
if (categoryInfos && !selectedLgCatCd) {
setSelectedLgCatCd(categoryInfos[0].lgCatCd);
}
}, []);

View File

@@ -21,7 +21,7 @@ export default function OnSaleProductList({
const { getScrollTo, scrollLeft } = useScrollTo();
useEffect(() => {
const containerId = "containerId-" + expsOrd;
const containerId = "onSaleProductListId-" + expsOrd;
const container = document.getElementById(containerId);
if (container) {
@@ -54,7 +54,7 @@ export default function OnSaleProductList({
);
return (
<div className={css.container} id={"containerId-" + expsOrd}>
<div className={css.container} id={"onSaleProductListId-" + expsOrd}>
{saleNm && saleProductInfos && (
<>
<SectionTitle title={saleNm} />