[디테일] 구매부분 수정

- select option 추가로 인한 인덱스 -1 처리.
This commit is contained in:
junghoon86.park
2025-10-27 12:15:44 +09:00
parent 33f628e81d
commit 22a810571c

View File

@@ -445,7 +445,7 @@ const BuyOption = ({
// 첫번째 옵션 선택 핸들러 (SingleOption과 동일)
const handleFirstOptionSelect = (selected) => {
const optionValIdx = selected.selected;
const optionValIdx = selected.selected - 1;
console.log('[BuyOption] First option selected:', optionValIdx);
setSelectedBtnOptIdx(optionValIdx);
@@ -457,7 +457,7 @@ const BuyOption = ({
// 두번째 옵션 선택 핸들러 (SingleOption과 동일)
const handleSecondOptionSelect = (selected) => {
const index = selected.selected;
const index = selected.selected - 1;
console.log('[BuyOption] Second option selected:', index);
setSelectedOptionItemIndex(index);
setSelectedOptions(