From 3c63663a4751407d49fba699c8ebee56d4a4dcad Mon Sep 17 00:00:00 2001 From: Adam Cohen Hillel Date: Sat, 19 Apr 2025 21:49:00 +0100 Subject: [PATCH] consistent pricing --- .../src/components/billing/PlanComparison.tsx | 61 +------------------ .../home/sections/pricing-section.tsx | 59 +----------------- frontend/src/lib/home.tsx | 50 +++++++++++++++ 3 files changed, 55 insertions(+), 115 deletions(-) diff --git a/frontend/src/components/billing/PlanComparison.tsx b/frontend/src/components/billing/PlanComparison.tsx index 1a9ee845..6deb82cf 100644 --- a/frontend/src/components/billing/PlanComparison.tsx +++ b/frontend/src/components/billing/PlanComparison.tsx @@ -7,68 +7,13 @@ import { motion } from "motion/react"; import { setupNewSubscription } from "@/lib/actions/billing"; import { SubmitButton } from "@/components/ui/submit-button"; import { Button } from "@/components/ui/button"; - +import { siteConfig } from "@/lib/home"; export const SUBSCRIPTION_PLANS = { FREE: 'price_1RDQbOG6l1KZGqIrgrYzMbnL', BASIC: 'price_1RC2PYG6l1KZGqIrpbzFB9Lp', PRO: 'price_1RDQWqG6l1KZGqIrChli4Ys4' } as const; -// Custom pricing data with cloud prices -const cloudPricingItems = [ - { - name: "Free", - price: "$0", - description: "For individual use and exploration", - buttonText: "Get Started", - buttonColor: "bg-primary text-white", - isPopular: false, - hours: "1 hour", - features: [ - "1 hour usage per month", - "Basic features", - "Community support", - "Single user", - "Standard response time", - "Public templates only", - ], - }, - { - name: "Basic", - price: "$10", - description: "For professionals and small teams", - buttonText: "Upgrade Now", - buttonColor: "bg-black text-white dark:bg-white dark:text-black", - isPopular: true, - hours: "10 hours", - features: [ - "10 hours usage per month", - "Priority support", - "Advanced features", - "3 team members", - "Custom integrations", - "API access", - ], - }, - { - name: "Pro", - price: "$50", - description: "For organizations with complex needs", - buttonText: "Upgrade Now", - buttonColor: "bg-primary text-white", - isPopular: false, - hours: "100 hours", - features: [ - "100 hours usage per month", - "Dedicated support", - "SSO & advanced security", - "10 team members", - "Service level agreement", - "Custom AI model training", - ], - }, -]; - interface PlanComparisonProps { accountId?: string | null; returnUrl?: string; @@ -78,7 +23,7 @@ interface PlanComparisonProps { } // Price display animation component -const PriceDisplay = ({ tier }: { tier: typeof cloudPricingItems[number] }) => { +const PriceDisplay = ({ tier }: { tier: typeof siteConfig.cloudPricingItems[number] }) => { return ( - {cloudPricingItems.map((tier) => { + {siteConfig.cloudPricingItems.map((tier) => { const isCurrentPlan = currentPlanId === SUBSCRIPTION_PLANS[tier.name.toUpperCase() as keyof typeof SUBSCRIPTION_PLANS]; return ( diff --git a/frontend/src/components/home/sections/pricing-section.tsx b/frontend/src/components/home/sections/pricing-section.tsx index 683759f0..512ddf69 100644 --- a/frontend/src/components/home/sections/pricing-section.tsx +++ b/frontend/src/components/home/sections/pricing-section.tsx @@ -65,61 +65,6 @@ export function PricingSection() { "cloud", ); - // Custom pricing data with cloud prices - const cloudPricingItems = [ - { - name: "Free", - price: "$0", - description: "For individual use and exploration", - buttonText: "Hire Suna", - buttonColor: "bg-secondary text-white", - isPopular: false, - hours: "1 hour", - features: [ - "1 hour usage per month", - "Basic features", - "Community support", - "Single user", - "Standard response time", - "Public templates only", - ], - }, - { - name: "Pro", - price: "$29", - description: "For professionals and small teams", - buttonText: "Hire Suna", - buttonColor: "bg-primary text-white", - isPopular: true, - hours: "20 hours", - features: [ - "20 hours usage per month", - "Priority support", - "Advanced features", - "5 team members", - "Custom integrations", - "API access", - ], - }, - { - name: "Enterprise", - price: "$199", - description: "For organizations with complex needs", - buttonText: "Contact Sales", - buttonColor: "bg-secondary text-white", - isPopular: false, - hours: "Unlimited", - features: [ - "Unlimited usage", - "Dedicated support", - "SSO & advanced security", - "Unlimited team members", - "Service level agreement", - "Custom AI model training", - ], - }, - ]; - // Handle tab change const handleTabChange = (tab: "cloud" | "self-hosted") => { if (tab === "self-hosted") { @@ -146,7 +91,7 @@ export function PricingSection() { const PriceDisplay = ({ tier, }: { - tier: typeof cloudPricingItems[0]; + tier: typeof siteConfig.cloudPricingItems[0]; }) => { const price = tier.price; @@ -322,7 +267,7 @@ export function PricingSection() { {deploymentType === "cloud" && (
- {cloudPricingItems.map((tier) => ( + {siteConfig.cloudPricingItems.map((tier) => (