chore: updated pricing validation for cloud and self hosted (#848)

This commit is contained in:
guru_sainath
2024-08-16 14:17:28 +05:30
committed by GitHub
parent d7d84535b1
commit 63e09a6be3
2 changed files with 2 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ const calculateYearlyDiscount = (monthlyPrice: number, yearlyPricePerMonth: numb
const renderPlanPricing = (price: number, members: number = 1, recurring: string) => {
if (recurring === "month") return ((price / 100) * members).toFixed(0);
if (recurring === "year") return ((price / 1200) * members).toFixed(0);
if (recurring === "year") return ((price / 100) * members).toFixed(0);
};
const CloudUpgradePlanPage = observer(() => {
@@ -73,7 +73,6 @@ const CloudUpgradePlanPage = observer(() => {
const monthlyPlanUnitPrice = (monthlyPlan?.unit_amount || 0) / 100;
const yearlyPlanUnitPrice = (yearlyPlan?.unit_amount || 0) / 1200;
const yearlyDiscountedPrice = calculateYearlyDiscount(monthlyPlanUnitPrice, yearlyPlanUnitPrice);
const workspaceOnTrial =

View File

@@ -22,7 +22,7 @@ const selfHostedProducts: TSelfHostedProduct[] = [
},
{
recurring: "year",
unit_amount: 6,
unit_amount: 72,
redirection_link: process.env.NEXT_PUBLIC_PRO_SELF_HOSTED_PAYMENT_URL || undefined,
},
];