consistent pricing

This commit is contained in:
Adam Cohen Hillel 2025-04-19 21:49:00 +01:00
parent 542c18cd2f
commit 3c63663a47
3 changed files with 55 additions and 115 deletions

View File

@ -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 (
<motion.span
key={tier.price}
@ -128,7 +73,7 @@ export function PlanComparison({
return (
<div className={cn("grid min-[650px]:grid-cols-2 min-[900px]:grid-cols-3 gap-4 w-full max-w-6xl mx-auto", className)}>
{cloudPricingItems.map((tier) => {
{siteConfig.cloudPricingItems.map((tier) => {
const isCurrentPlan = currentPlanId === SUBSCRIPTION_PLANS[tier.name.toUpperCase() as keyof typeof SUBSCRIPTION_PLANS];
return (

View File

@ -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" && (
<div className="grid min-[650px]:grid-cols-2 min-[900px]:grid-cols-3 gap-4 w-full max-w-6xl mx-auto px-6">
{cloudPricingItems.map((tier) => (
{siteConfig.cloudPricingItems.map((tier) => (
<div
key={tier.name}
className={cn(

View File

@ -75,6 +75,56 @@ export const siteConfig = {
description: "Suna by Kortix is a generalist AI Agent that acts on your behalf.",
inputPlaceholder: "Ask Suna to...",
},
cloudPricingItems: [
{
name: "Free",
price: "$0",
description: "For individual use and exploration",
buttonText: "Hire Suna",
buttonColor: "bg-secondary text-white",
isPopular: false,
hours: "10 minutes",
features: [
"10 minutes usage per month",
"Community support",
"Single user",
"Standard response time",
],
},
{
name: "Pro",
price: "$29",
description: "For professionals and small teams",
buttonText: "Hire Suna",
buttonColor: "bg-primary text-white",
isPopular: true,
hours: "4 hours",
features: [
"5 hours usage per month",
"Priority support",
"Advanced features",
"5 team members",
"Custom integrations",
],
},
{
name: "Enterprise",
price: "$199",
description: "For organizations with complex needs",
buttonText: "Contact Sales",
buttonColor: "bg-secondary text-white",
isPopular: false,
hours: "40 hours",
features: [
"40 hours usage per month",
"Dedicated support",
"SSO & advanced security",
"Unlimited team members",
"Service level agreement",
"Custom AI model training",
],
},
],
companyShowcase: {
companyLogos: [
{