[DetailPanel] option.lge API 조건 추가

This commit is contained in:
고동영
2024-07-16 18:28:45 +09:00
parent 541435e49a
commit 04f25135dd
2 changed files with 11 additions and 9 deletions

View File

@@ -119,7 +119,7 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
}, [dispatch, panelInfo]);
useEffect(() => {
if (productData && productData?.prodOptYn === "Y") {
if (productData?.pmtSuptYn === "Y" && productData?.grPrdtProcYn === "Y") {
dispatch(
getProductGroup({
patnrId: patnrId,

View File

@@ -25,6 +25,7 @@ import {
getProductCouponSearch,
getProductCouponTotDownload,
} from "../../../actions/couponActions";
import { sendLogPaymentEntry } from "../../../actions/logActions";
import { pushPanel } from "../../../actions/panelActions";
import { getProductOption } from "../../../actions/productActions";
import TButton from "../../../components/TButton/TButton";
@@ -38,7 +39,6 @@ import { $L, getQRCodeUrl } from "../../../utils/helperMethods";
import { SpotlightIds } from "../../../utils/SpotlightIds";
import FavoriteBtn from "../components/FavoriteBtn";
import css from "./SingleOption.module.less";
import { sendLogPaymentEntry } from "../../../actions/logActions";
const Container = SpotlightContainerDecorator(
{ enterTo: "default-element" },
@@ -166,12 +166,14 @@ export default function SingleOption({
}, [partnerCoupon, shoptimeCoupon]);
useEffect(() => {
dispatch(
getProductOption({
patnrId: selectedPatnrId,
prdtId: selectedPrdtId,
})
);
if (productInfo.prodOptYn === "Y") {
dispatch(
getProductOption({
patnrId: selectedPatnrId,
prdtId: selectedPrdtId,
})
);
}
dispatch(
getProductCouponSearch({
@@ -180,7 +182,7 @@ export default function SingleOption({
mbrNo: userNumber,
})
);
}, [dispatch, selectedPatnrId, selectedPrdtId, productData]);
}, [dispatch, selectedPatnrId, selectedPrdtId, productInfo]);
useEffect(() => {
if (type !== "theme") {