[ProductOption] 구매불가 영역 추가

- OptionPartnerPrice 파일 생성
- 옵션 영역 별 분기처리
This commit is contained in:
jiwon93.son
2024-03-04 18:17:44 +09:00
parent 82b3950b0f
commit e341493292
3 changed files with 18 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
import React from "react";
import css from "./OptionPartnerPrice.module.less";
export default function OptionPartnerPrice() {
return <div className={css.priceContainer}>PartnerPrice</div>;
}

View File

@@ -5,6 +5,7 @@ import { useSelector } from "react-redux";
import { $L } from "../../../utils/helperMethods";
import OptionCommon from "../components/optionTypes/OptionCommon";
import OptionGroup from "../components/optionTypes/OptionGroup";
import OptionPartnerPrice from "../components/optionTypes/OptionPartnerPrice";
import ProductTag from "../components/ProductTag";
import StarRating from "../components/StarRating";
import css from "./ProductOption.module.less";
@@ -12,7 +13,8 @@ import css from "./ProductOption.module.less";
export default function ProductOption({ selectedPatnrId, selectedPardtId }) {
const productDataInfos = useSelector((state) => state.main.productData);
const isGroupOption = useSelector((state) => state.main.productGroupYn);
const { patncLogoPath, prdtId, prdtNm, revwGrd } = productDataInfos;
const { patncLogoPath, prdtId, prdtNm, revwGrd, pmtSuptYn } =
productDataInfos;
return (
<div className={css.optionContainer}>
@@ -31,15 +33,20 @@ export default function ProductOption({ selectedPatnrId, selectedPardtId }) {
)}
<div>
{isGroupOption && isGroupOption === "Y" ? (
/* 그룹상품 영역 */
<OptionGroup
selectedPatnrId={selectedPatnrId}
selectedPardtId={selectedPardtId}
/>
) : (
) : pmtSuptYn === "Y" ? (
/* 일반옵션 영역 */
<OptionCommon
selectedPatnrId={selectedPatnrId}
selectedPardtId={selectedPardtId}
/>
) : (
/* 구매불가 영역 */
<OptionPartnerPrice />
)}
</div>
</div>