일반상품 옵션이 있을경우 로직 구현

This commit is contained in:
고동영
2024-04-18 18:32:43 +09:00
parent cd9396c26e
commit 0e761559e4
7 changed files with 167 additions and 129 deletions

View File

@@ -9,11 +9,12 @@ import {
getThemeHotelDetailInfo,
} from "../../actions/homeActions";
import { getMainCategoryDetail } from "../../actions/mainActions";
import { popPanel } from "../../actions/panelActions";
import { popPanel, resetPanels } from "../../actions/panelActions";
import { getProductGroup } from "../../actions/productActions";
import TBody from "../../components/TBody/TBody";
import THeader from "../../components/THeader/THeader";
import TPanel from "../../components/TPanel/TPanel";
import { panel_names } from "../../utils/Config";
import css from "./DetailPanel.module.less";
import GroupProduct from "./GroupProduct/GroupProduct";
import SingleProduct from "./SingleProduct/SingleProduct";
@@ -47,7 +48,9 @@ export default function ItemDetail() {
if (panels[i].name === "detailpanel") {
setSelectedPatnrId(panels[i].panelInfo.patnrId);
setSelectedPrtdId(panels[i].panelInfo.prdtId);
if (panels[0].name == "hotpickpanel") {
setSelectedCurationId(panels[i].panelInfo.curationId);
setThemeType(panels[i].panelInfo.type);
if (panels[0].name === "hotpickpanel") {
setSelectedPatnrId(panels[i].panelInfo.patnrId);
setSelectedCurationId(panels[i].panelInfo.curationId);
setThemeType(panels[i].panelInfo.type);
@@ -89,10 +92,6 @@ export default function ItemDetail() {
}, [dispatch, selectedPatnrId, selectedPrdtId, panels]);
const onClick = useCallback(() => {
setSelectedPrtdId("");
setSelectedPatnrId("");
setSelectedCurationId("");
setCategoryId("");
dispatch(popPanel());
}, [dispatch]);