[상품 상세]

- 상풉 옵션별 ID노출 처리.
This commit is contained in:
junghoon86.park
2025-12-08 20:10:02 +09:00
parent b2807c5a39
commit 80c593e6f0
2 changed files with 4 additions and 3 deletions

View File

@@ -1523,6 +1523,7 @@ const handleCartMove = useCallback(() => {
disabled: detail.optStkQty <= 0,
imageUrl: detail.optImgUrl || null,
price: detail.priceInfo.split('|')[1],
prodOptCdCval: detail.prodOptCdCval,
})) || []),
]}
selectedIndex={selectedOptionItemIndex}

View File

@@ -72,6 +72,7 @@ const CustomDropDown = ({
const selectedOption = normalizedOptions[selectedIndex];
const selectedLabel = selectedOption?.label || placeholder;
const selectedId = selectedOption?.prodOptCdCval ? selectedOption?.prodOptCdCval : null;
const selectedImage = selectedOption?.imageUrl;
return (
@@ -93,7 +94,7 @@ const CustomDropDown = ({
className={styles.custom_dropdown__image}
/>
)}
<div className={styles.custom_dropdown__text}>{selectedLabel}</div>
<div className={styles.custom_dropdown__text}>{selectedLabel} {selectedId ? `ID : ${selectedId}` : ''}</div>
</div>
<div className={styles.custom_dropdown__icon}>
<img src={iconDownArrow} alt="dropdown arrow" />
@@ -108,7 +109,6 @@ const CustomDropDown = ({
.map((option, reverseIndex) => {
const originalIndex = normalizedOptions.length - 1 - reverseIndex;
const isOptionDisabled = option.disabled;
return (
<SpottableDiv
key={originalIndex}
@@ -133,7 +133,7 @@ const CustomDropDown = ({
/>
)}
<span className={styles.custom_dropdown__optname}>
{option.label}
{option.label} {option.prodOptCdCval ? `ID : ${option.prodOptCdCval}` : ''}
</span>
{isOptionDisabled ? (
<span className={styles.custom_dropdown__lasttxt}>