custom tier

This commit is contained in:
Philipinho
2025-06-24 04:42:09 -07:00
parent 5fb90527ad
commit 9a16780d9f
3 changed files with 14 additions and 11 deletions

View File

@ -52,14 +52,16 @@ export default function BillingPlans() {
return null;
}
const selectData = firstPlan.pricingTiers.map((tier, index) => {
const prevMaxUsers =
index > 0 ? firstPlan.pricingTiers[index - 1].upTo : 0;
return {
value: tier.upTo.toString(),
label: `${prevMaxUsers + 1}-${tier.upTo} users`,
};
});
const selectData = firstPlan.pricingTiers
.filter((tier) => !tier.custom)
.map((tier, index) => {
const prevMaxUsers =
index > 0 ? firstPlan.pricingTiers[index - 1].upTo : 0;
return {
value: tier.upTo.toString(),
label: `${prevMaxUsers + 1}-${tier.upTo} users`,
};
});
return (
<Container size="xl" py="xl">

View File

@ -58,6 +58,7 @@ export interface IBillingPlan {
interface PricingTier {
upTo: number;
monthly: number;
yearly: number;
monthly?: number;
yearly?: number;
custom?: boolean;
}