Skip to content

Commit 2047d79

Browse files
authored
Merge pull request #6852 from Namanv0509/minor-fix
Minor add on fix
2 parents ab32811 + b34ccba commit 2047d79

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • src/components/Pricing/PricingAddons

src/components/Pricing/PricingAddons/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,16 +520,17 @@ export const PricingAddons = ({ isYearly = false, setIsYearly ,currency,enterpri
520520
{subAddOn.name} × {subAddOn.pricing?.[quantityIndex]?.learners || 0}/{isYearly ? "yearly" : "monthly"}
521521
</Typography>
522522
<Typography variant="body1" sx={typographyStyles.pricingItemRight} fontWeight="500">
523-
{formatPrice(
523+
{(
524524
(() => {
525525
const subAddOnPricing = subAddOn.pricing && subAddOn.pricing[quantityIndex];
526526
if (subAddOnPricing) {
527527
const subAddOnPerUserCost = isYearly ? subAddOnPricing.yearlyPerUser : subAddOnPricing.monthlyPerUser;
528-
return subAddOnPerUserCost * subAddOnPricing.learners;
528+
const totalCost = subAddOnPerUserCost * subAddOnPricing.learners;
529+
return formatPrice(totalCost);
529530
}
530531
return 0;
531532
})()
532-
)}
533+
)}/{isYearly ? "yearly" : "monthly"}
533534
</Typography>
534535
</Box>
535536
)
@@ -555,7 +556,7 @@ export const PricingAddons = ({ isYearly = false, setIsYearly ,currency,enterpri
555556

556557
<Box sx={boxStyles.flexBetween}>
557558
<Typography variant="body1" gutterBottom sx={typographyStyles.subheading}>
558-
{isYearly ? "Yearly" : "Monthly"} Cost
559+
Total Cost
559560
</Typography>
560561
<Typography variant="h4" fontWeight="bold" sx={typographyStyles.qanelasFont}>
561562
{formatPrice(totalPrice)}

0 commit comments

Comments
 (0)