[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]
|
[onClick, disabled]
|
||||||
);
|
);
|
||||||
const _onFocus = useCallback(() => {
|
const _onFocus = useCallback(() => {
|
||||||
|
console.log("#priceLabel", priceLabel);
|
||||||
if (onFocus) {
|
if (onFocus) {
|
||||||
onFocus();
|
onFocus();
|
||||||
}
|
}
|
||||||
@@ -123,11 +124,14 @@ export default memo(function TItemCard({
|
|||||||
? "Sale price " + discountedPrice + ", "
|
? "Sale price " + discountedPrice + ", "
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
const priceLabel = originalPrice
|
const priceLabel =
|
||||||
? parseFloat(originalPrice.replace("$", "")) === 0
|
originalPrice && parseFloat(originalPrice.replace("$", "")) === 0
|
||||||
? " " + offerInfo
|
? offerInfo
|
||||||
: " Original price " + originalPrice + ", "
|
? " " + offerInfo
|
||||||
: "";
|
: ""
|
||||||
|
: originalPrice
|
||||||
|
? " Original price " + originalPrice + ", "
|
||||||
|
: "";
|
||||||
const lastLabeltext = lastLabel ? lastLabel : "";
|
const lastLabeltext = lastLabel ? lastLabel : "";
|
||||||
const firstLabeltext = firstLabel ? firstLabel + " " : "";
|
const firstLabeltext = firstLabel ? firstLabel + " " : "";
|
||||||
const soldOutText = soldoutFlag === "Y" ? "Sold Out " : "";
|
const soldOutText = soldoutFlag === "Y" ? "Sold Out " : "";
|
||||||
|
|||||||
Reference in New Issue
Block a user