유메이라이크 작업중 api추가

This commit is contained in:
고동영
2024-02-28 18:25:27 +09:00
parent 4bc0deded0
commit d6ec9e12c0
13 changed files with 254 additions and 25 deletions

View File

@@ -2,13 +2,17 @@ import React, { useEffect, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { getMainCategoryDetail } from "../../actions/mainActions";
import {
getMainCategoryDetail,
getMainYouMayLike,
} from "../../actions/mainActions";
import { popPanel } from "../../actions/panelActions";
import TBody from "../../components/TBody/TBody";
import THeader from "../../components/THeader/THeader";
import TPanel from "../../components/TPanel/TPanel";
import ProductOption from "./container/ProductOption";
import ProductThumbnail from "./container/ProductThumbnail";
import YouMayLike from "./container/YouMayLike";
import css from "./DetailPanel.module.less";
export default function ItemDetail() {
@@ -37,12 +41,24 @@ export default function ItemDetail() {
prdtId: panelInfo?.prdtId,
})
);
// dispatch(
// getMainCategoryDetail({
// patnrId: 1,
// prdtId: "A523924",
// })
// );
}
}, [dispatch, panelInfo]);
useEffect(() => {
setProductData(data);
}, [data, productData]);
// dispatch(
// getMainYouMayLike({
// lgCatCd: productData?.catCd,
// })
// );
//console.log("#productdata", productData);
}, [productData, dispatch]);
const onClick = () => {
dispatch(popPanel());
@@ -56,12 +72,15 @@ export default function ItemDetail() {
onClick={onClick}
/>
<TBody className={css.container} scrollable={false}>
<ProductThumbnail productData={productData} />
<ProductThumbnail />
<ProductOption
selectedPatnrId={panelInfo?.patnrId}
selectedPardtId={panelInfo?.prdtId}
// selectedPatnrId={1}
// selectedPardtId={"A523924"}
/>
</TBody>
<YouMayLike productData={data} />
</TPanel>
);
}