[BuyOption] 옵션 미선택시 에러 팝업 처리

- 에러 팝업 노출 및 의존성 배열 추가.
This commit is contained in:
junghoon86.park
2025-10-30 18:03:58 +09:00
parent c0c5f079ca
commit 53a6954a91

View File

@@ -344,7 +344,18 @@ const BuyOption = ({
productOptionInfos.length > 1 &&
productInfo?.optProdYn === 'Y'
) {
if (selectFirstOptionIndex === 0) {
dispatch(
showError(
null,
"PLEASE SELECT OPTION",
false,
null,
null
)
);
return;
}
}
@@ -353,7 +364,18 @@ const BuyOption = ({
productOptionInfos[selectedBtnOptIdx]?.prdtOptDtl.length > 1 &&
productInfo?.optProdYn === 'Y'
) {
if (selectSecondOptionIndex === 0) {
dispatch(
showError(
null,
"PLEASE SELECT OPTION",
false,
null,
null
)
);
return;
}
}
@@ -413,6 +435,8 @@ const BuyOption = ({
productOptionInfos,
quantity,
logInfo,
selectFirstOptionIndex,
selectSecondOptionIndex,
]);
// ADD TO CART 버튼 클릭 핸들러