유메이라이크 작업중 api추가
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user