diff --git a/src/pages/Pricing.tsx b/src/pages/Pricing.tsx new file mode 100644 index 0000000..ae5fd7e --- /dev/null +++ b/src/pages/Pricing.tsx @@ -0,0 +1,218 @@ +import { useState } from "react"; +import { toast } from "sonner"; +import { Link } from "react-router-dom"; +import { Button } from "@/components/ui/button"; +import { useSaasMutation } from "@/hooks/use-tygarun"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; +import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; +import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion"; +import { Check, X, ArrowRight, Sparkles, Shield } from "lucide-react"; +import Header from "@/components/Header"; +import Footer from "@/components/Footer"; + +const tiers = [ + { + name: "Starter", + monthlyPrice: 29, + annualPrice: 24, + description: "Perfect for small teams getting started.", + features: ["Up to 10 team members", "5 projects", "Basic analytics", "Email support", "1 GB storage"], + cta: "Start Free Trial", + popular: false, + }, + { + name: "Professional", + monthlyPrice: 79, + annualPrice: 64, + description: "For growing teams that need more power.", + features: ["Up to 50 team members", "Unlimited projects", "Advanced analytics", "Priority support", "50 GB storage", "Custom workflows", "API access"], + cta: "Start Free Trial", + popular: true, + }, + { + name: "Enterprise", + monthlyPrice: 199, + annualPrice: 159, + description: "For organizations with advanced needs.", + features: ["Unlimited team members", "Unlimited projects", "AI-powered analytics", "24/7 dedicated support", "Unlimited storage", "Custom workflows", "API access", "SSO & SAML", "Custom SLA"], + cta: "Contact Sales", + popular: false, + }, +]; + +const comparisonFeatures = [ + { name: "Team members", starter: "10", pro: "50", enterprise: "Unlimited" }, + { name: "Projects", starter: "5", pro: "Unlimited", enterprise: "Unlimited" }, + { name: "Storage", starter: "1 GB", pro: "50 GB", enterprise: "Unlimited" }, + { name: "Unlimited projects", starter: false, pro: true, enterprise: true }, + { name: "API access", starter: false, pro: true, enterprise: true }, + { name: "Priority support", starter: false, pro: true, enterprise: true }, + { name: "Custom integrations", starter: false, pro: true, enterprise: true }, + { name: "SSO/SAML", starter: false, pro: false, enterprise: true }, + { name: "Dedicated manager", starter: false, pro: false, enterprise: true }, +]; + +const faqs = [ + { q: "Can I try Nexus for free?", a: "Yes! Every plan comes with a 14-day free trial. No credit card required to get started." }, + { q: "Can I switch plans later?", a: "Absolutely. You can upgrade or downgrade your plan at any time. Changes take effect immediately." }, + { q: "What payment methods do you accept?", a: "We accept all major credit cards, ACH bank transfers, and wire transfers for Enterprise plans." }, + { q: "Is there a discount for nonprofits?", a: "Yes, we offer a 50% discount for registered nonprofits and educational institutions. Contact sales for details." }, + { q: "How does the AI task automation work?", a: "Our AI learns from your team patterns and automatically suggests task assignments, priorities, and deadlines based on historical data." }, + { q: "What happens when my trial ends?", a: "Your data is saved for 30 days after trial expiry. Choose a plan to continue, or export your data at any time." }, +]; + +export default function PricingPage() { + const [billing, setBilling] = useState("monthly"); + const { mutate: startCheckout, loading: checkoutBusy } = useSaasMutation("billing", "/checkout"); + + const handleCheckout = async (tier) => { + const price = billing === "monthly" ? tier.monthlyPrice : tier.annualPrice; + try { + const res = await startCheckout({ plan: tier.name.toLowerCase(), amount: price * 100, interval: billing }); + if (res?.url) window.location.href = res.url; + else toast.success("Starting your " + tier.name + " trial..."); + } catch (err) { + toast.error("Checkout failed. Please try again."); + } + }; + + return ( +
No hidden fees. No surprise charges. Choose the plan that fits your team.
+{tier.description}
+Billed annually (\${tier.annualPrice * 12}/yr)
+ )} +
+
14 days free. No credit card required. Cancel anytime.
+ +