[SHOPTIME-3655] Search / Result / No Result / Best Seller / undefiend 발화됨
[수정사항] 기존 priceLabel에서 offerInfo가 없는경우에 undefined로 발화를 하여 offerInfo가 없는 경우에도 빈 문자열 조건 추가
This commit is contained in:
@@ -106,6 +106,7 @@ export default memo(function TItemCard({
|
||||
[onClick, disabled]
|
||||
);
|
||||
const _onFocus = useCallback(() => {
|
||||
console.log("#priceLabel", priceLabel);
|
||||
if (onFocus) {
|
||||
onFocus();
|
||||
}
|
||||
@@ -123,10 +124,13 @@ export default memo(function TItemCard({
|
||||
? "Sale price " + discountedPrice + ", "
|
||||
: "";
|
||||
|
||||
const priceLabel = originalPrice
|
||||
? parseFloat(originalPrice.replace("$", "")) === 0
|
||||
const priceLabel =
|
||||
originalPrice && parseFloat(originalPrice.replace("$", "")) === 0
|
||||
? offerInfo
|
||||
? " " + offerInfo
|
||||
: " Original price " + originalPrice + ", "
|
||||
: ""
|
||||
: originalPrice
|
||||
? " Original price " + originalPrice + ", "
|
||||
: "";
|
||||
const lastLabeltext = lastLabel ? lastLabel : "";
|
||||
const firstLabeltext = firstLabel ? firstLabel + " " : "";
|
||||
|
||||
Reference in New Issue
Block a user