[DetailPanel] BUYNOW 클릭시 옵션이 없는경우 분기처리
This commit is contained in:
@@ -9,6 +9,7 @@ import React, {
|
||||
import classNames from "classnames";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
import { log } from "@enact/core/handle";
|
||||
import Spotlight from "@enact/spotlight";
|
||||
import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
|
||||
import Spottable from "@enact/spotlight/Spottable";
|
||||
@@ -296,13 +297,20 @@ export default function SingleOption({
|
||||
const optionName = renderOptionName();
|
||||
const optionValueName = renderOptionValue();
|
||||
|
||||
console.log("#optionName", optionName);
|
||||
console.log("#optionValue", optionValueName);
|
||||
console.log("# productOptionInfos ", productOptionInfos);
|
||||
if (productInfo && productInfo?.soldoutFlag === "Y") {
|
||||
return;
|
||||
}
|
||||
if (!userNumber) {
|
||||
return dispatch(setShowPopup(Config.ACTIVE_POPUP.loginPopup));
|
||||
}
|
||||
if (optionName === "SELECT" || optionValueName === "SELECT") {
|
||||
if (
|
||||
productOptionInfos &&
|
||||
productOptionInfos.length > 0 &&
|
||||
(optionName === "SELECT" || optionValueName === "SELECT")
|
||||
) {
|
||||
return dispatch(setShowPopup(Config.ACTIVE_POPUP.loginPopup));
|
||||
}
|
||||
if (userNumber && selectedPatnrId && selectedPrdtId && quantity) {
|
||||
@@ -333,6 +341,7 @@ export default function SingleOption({
|
||||
selectedPrdtId,
|
||||
productInfo,
|
||||
selectedOptions,
|
||||
productOptionInfos,
|
||||
quantity,
|
||||
checkOutValidate,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user