From 5c8b447b7d72f272a65e20784697e4f1a8f4441b Mon Sep 17 00:00:00 2001 From: Marc Seitz Date: Mon, 29 Apr 2024 13:17:52 +0400 Subject: [PATCH] chore: update language and be more precise --- components/billing/upgrade-plan-modal.tsx | 3 +- pages/pricing.tsx | 5 +- pages/settings/billing.tsx | 196 ++++++++++++++++++++-- 3 files changed, 190 insertions(+), 14 deletions(-) diff --git a/components/billing/upgrade-plan-modal.tsx b/components/billing/upgrade-plan-modal.tsx index ae93b3f12..26a834308 100644 --- a/components/billing/upgrade-plan-modal.tsx +++ b/components/billing/upgrade-plan-modal.tsx @@ -40,7 +40,7 @@ export function UpgradePlanModal({ "Custom branding", "1-year analytics retention", "Advanced access controls", - "Folders", + "Folder organization", ]; } @@ -48,6 +48,7 @@ export function UpgradePlanModal({ return [ "3 users", "1 dataroom", + "Multi-file sharing", "Custom domain", "Unlimited documents", "Unlimited subfolder levels", diff --git a/pages/pricing.tsx b/pages/pricing.tsx index 00a989f12..4603fd405 100644 --- a/pages/pricing.tsx +++ b/pages/pricing.tsx @@ -69,7 +69,7 @@ const tiers: { "Custom branding", "1-year analytics retention", "Advanced access controls", - "Folders", + "Folder organization", ], bgColor: "bg-gray-200", borderColor: "#bg-gray-800", @@ -82,11 +82,12 @@ const tiers: { id: "tier-business", href: "/login", price: { monthly: "€79", annually: "€59" }, - description: "A plan that scales with your rapidly growing business.", + description: "The one for more control, data room, and multi-file sharing.", featureIntro: "Everything in Pro, plus:", features: [ "3 users", "1 dataroom", + "Multi-file sharing", "Custom domain", "Unlimited documents", "Unlimited subfolder levels", diff --git a/pages/settings/billing.tsx b/pages/settings/billing.tsx index 7a3f10c79..0f9fd4d57 100644 --- a/pages/settings/billing.tsx +++ b/pages/settings/billing.tsx @@ -3,6 +3,7 @@ import AppLayout from "@/components/layouts/app"; import Navbar from "@/components/settings/navbar"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; +import { Switch } from "@/components/ui/switch"; import { useTeam } from "@/context/team-context"; import { useAnalytics } from "@/lib/analytics"; import { useBilling } from "@/lib/swr/use-billing"; @@ -27,7 +28,26 @@ export default function Billing() { const analytics = useAnalytics(); const { plan, startsAt, endsAt } = useBilling(); const [clicked, setClicked] = useState(false); - const frequency = frequencies[0]; + const frequency = frequencies[1]; + + const [toggleProYear, setToggleProYear] = useState(true); + const [toggleBusinessYear, setToggleBusinessYear] = useState(true); + const [frequencyPro, setFrequencyPro] = useState(frequencies[0]); + const [frequencyBusiness, setFrequencyBusiness] = useState(frequencies[0]); + + useEffect(() => { + if (toggleProYear) { + setFrequencyPro(frequencies[1]); + } else { + setFrequencyPro(frequencies[0]); + } + + if (toggleBusinessYear) { + setFrequencyBusiness(frequencies[1]); + } else { + setFrequencyBusiness(frequencies[0]); + } + }, [toggleProYear, toggleBusinessYear]); const teamInfo = useTeam(); @@ -93,7 +113,7 @@ export default function Billing() { id: "tier-pro", href: "/login", currentPlan: plan && plan == "pro" ? true : false, - price: { monthly: "€29", annually: "€19" }, + price: { monthly: "€39", annually: "€25" }, description: "The branded experience for your documents.", featureIntro: "Everything in Free, plus:", features: [ @@ -102,7 +122,7 @@ export default function Billing() { "Custom branding", "1-year analytics retention", "Advanced access controls", - "Folders", + "Folder organization", ], bgColor: "bg-gray-200", borderColor: "#bg-gray-800", @@ -116,11 +136,13 @@ export default function Billing() { href: "/login", currentPlan: plan && plan == "business" ? true : false, price: { monthly: "€79", annually: "€59" }, - description: "A plan that scales with your rapidly growing business.", + description: + "The one for more control, data room, and multi-file sharing.", featureIntro: "Everything in Pro, plus:", features: [ "3 users", "1 dataroom", + "Multi-file sharing", "Custom domain", "Unlimited documents", "Unlimited subfolder levels", @@ -184,22 +206,147 @@ export default function Billing() {
-

- {tier.description} -

+
+ {tier.id === "tier-free" ? ( +
+
+
+

No credit card required

+
+
+ ) : null} + {tier.id === "tier-pro" ? ( +
+ + setToggleProYear(!toggleProYear) + } + /> +
+ + Monthly + + | + + Annually + +
+
+ + 35% Saving +
+
+ ) : null} + {tier.id === "tier-business" ? ( +
+ + setToggleBusinessYear(!toggleBusinessYear) + } + /> +
+ + Monthly + + | + + Annually + +
+
+ + 25% Saving +
+
+ ) : null} + {tier.id === "tier-enterprise" ? ( +
+
+
+

Get in touch

+
+
+ ) : null} +

- - {tier.price[frequency.value]} + + {tier.id === "tier-pro" + ? tier.price[frequencyPro.value] + : tier.id === "tier-business" + ? tier.price[frequencyBusiness.value] + : tier.price[frequency.value]} - {frequency.priceSuffix} + {tier.id === "tier-pro" + ? frequencyPro.priceSuffix + : tier.id === "tier-business" + ? frequencyBusiness.priceSuffix + : frequency.priceSuffix}

+

+ {tier.description} +

    Manage Subscription + ) : plan !== "free" ? ( + ) : (