{product.name}
+{product.description}
+ + {product.discountRate > 0 && {discountPercent}% 할인} +{discountedPrice.toLocaleString()}원
+ + +{product.description}
+ + {product.discountRate > 0 && {discountPercent}% 할인} +{discountedPrice.toLocaleString()}원
+ + +{product.description}
+ > + ); +} + +function ProductPrice({ + price, + discountRate, +}: { + price: number; + discountRate: number; +}) { + const discountedPrice = price * (1 - discountRate); + + return ( +{discountedPrice.toLocaleString()}원
+