[OnSalePanel] 불필요 로직 삭제 및 id 수정
Detail Notes : 1. OnSalePanel, 불필요 로직 삭제 2. OnSaleProductList, “containerId-“ → “onSaleProductListId-“ 수정
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}, []);
|
||||
|
||||
|
||||
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user