From 65ad72cecc39cb209c4f8555b596b841257eb459 Mon Sep 17 00:00:00 2001 From: Hamzah Ullah Date: Wed, 2 Oct 2024 09:53:13 -0400 Subject: [PATCH] fix: adds conditional small class to price ranges --- src/components/course/CourseSidebarPrice.jsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/course/CourseSidebarPrice.jsx b/src/components/course/CourseSidebarPrice.jsx index 59e577f3f..805a64039 100644 --- a/src/components/course/CourseSidebarPrice.jsx +++ b/src/components/course/CourseSidebarPrice.jsx @@ -27,6 +27,7 @@ const CourseSidebarPrice = () => { return ; } const originalPriceDisplay = getContentPriceDisplay(coursePrice.listRange); + const hasPriceRange = coursePrice.listRange.length > 1; const showOrigPrice = !enterpriseCustomer.hideCourseOriginalPrice; const crossedOutOriginalPrice = ( @@ -36,7 +37,8 @@ const CourseSidebarPrice = () => { defaultMessage="Priced reduced from:" description="Message to indicate that the price has been reduced." /> - ${originalPriceDisplay} {currency} + + ${originalPriceDisplay} {currency} ); @@ -66,7 +68,9 @@ const CourseSidebarPrice = () => { if (!hasDiscountedPrice && canRequestSubsidy) { return ( - ${originalPriceDisplay} {currency}
+ + ${originalPriceDisplay} {currency} +
{ } } const discountedPriceDisplay = `${getContentPriceDisplay(coursePrice.discounted)} ${currency}`; + const hasDiscountedPriceRange = coursePrice.discounted.length > 1; return ( <>
0 || showOrigPrice })}> @@ -125,7 +130,8 @@ const CourseSidebarPrice = () => { defaultMessage="Discounted price:" description="Message to indicate that the price has been discounted." /> - ${discountedPriceDisplay} + + ${discountedPriceDisplay} )}