diff --git a/frontend/src/components/hosted/PricingPage.tsx b/frontend/src/components/hosted/PricingPage.tsx index d1411ab..9d07d0b 100644 --- a/frontend/src/components/hosted/PricingPage.tsx +++ b/frontend/src/components/hosted/PricingPage.tsx @@ -1,51 +1,13 @@ import React from "react"; import Footer from "./LandingPage/Footer"; +import PricingPlans from "./payments/PricingPlans"; const PricingPage: React.FC = () => { return (
-

Pricing

-
- {/* Basic Plan */} -
-

Basic

-

$9.99/mo

-
    -
  • Feature 1
  • -
  • Feature 2
  • -
  • Feature 3
  • -
- -
- {/* Pro Plan */} -
-

Pro

-

$19.99/mo

-
    -
  • All Basic features
  • -
  • Feature 4
  • -
  • Feature 5
  • -
- -
- {/* Enterprise Plan */} -
-

Enterprise

-

Custom

-
    -
  • All Pro features
  • -
  • Custom integrations
  • -
  • Dedicated support
  • -
- -
-
+

Screenshot to Code Pricing

+ +
diff --git a/frontend/src/components/hosted/payments/PricingDialog.tsx b/frontend/src/components/hosted/payments/PricingDialog.tsx index 3ff0d59..289faf6 100644 --- a/frontend/src/components/hosted/payments/PricingDialog.tsx +++ b/frontend/src/components/hosted/payments/PricingDialog.tsx @@ -7,19 +7,12 @@ import { DialogTitle, DialogTrigger, } from "../../ui/dialog"; -import { FaCheckCircle } from "react-icons/fa"; -import Spinner from "../../custom-ui/Spinner"; -import useStripeCheckout from "./useStripeCheckout"; -import { Button } from "../../ui/button"; import { useStore } from "../../../store/store"; +import PricingPlans from "./PricingPlans"; const LOGOS = ["microsoft", "amazon", "mit", "stanford", "bytedance", "baidu"]; const PricingDialog: React.FC = () => { - const { checkout, isLoadingCheckout } = useStripeCheckout(); - const [paymentInterval, setPaymentInterval] = React.useState< - "monthly" | "yearly" - >("monthly"); const subscriberTier = useStore((state) => state.subscriberTier); const [showDialog, setShowDialog] = useStore((state) => [ state.isPricingDialogOpen, @@ -43,114 +36,8 @@ const PricingDialog: React.FC = () => { -
- - -
+ -
-
-
-

Hobby

-

Great to start

-
- - {paymentInterval === "monthly" ? "$15" : "$150"} - - - {paymentInterval === "monthly" ? "/ month" : "/ year"} - -
- - - -
    -
  • - - 100 credits / mo -
  • -
  • - - OpenAI models -
  • -
  • - - Claude models -
  • -
  • - - Chat support -
  • -
-
- -
-

Pro

-

Higher limits

-
- - {paymentInterval === "monthly" ? "$40" : "$400"} - - - {paymentInterval === "monthly" ? "/ month" : "/ year"} - -
- - - -
    -
  • - - 300 credits / mo -
  • -
  • - - OpenAI models -
  • -
  • - - Claude models -
  • -
  • - - Chat support -
  • -
-
-
-

1 credit = 1 code generation.
Cancel subscription at any time. diff --git a/frontend/src/components/hosted/payments/PricingPlans.tsx b/frontend/src/components/hosted/payments/PricingPlans.tsx new file mode 100644 index 0000000..e51d03c --- /dev/null +++ b/frontend/src/components/hosted/payments/PricingPlans.tsx @@ -0,0 +1,126 @@ +import { FaCheckCircle } from "react-icons/fa"; +import Spinner from "../../custom-ui/Spinner"; +import React from "react"; +import { Button } from "../../ui/button"; +import useStripeCheckout from "./useStripeCheckout"; + +function PricingPlans() { + const { checkout, isLoadingCheckout } = useStripeCheckout(); + const [paymentInterval, setPaymentInterval] = React.useState< + "monthly" | "yearly" + >("monthly"); + + return ( + <> +

+ + +
+
+
+
+

Hobby

+

Great to start

+
+ + {paymentInterval === "monthly" ? "$15" : "$150"} + + + {paymentInterval === "monthly" ? "/ month" : "/ year"} + +
+ + + +
    +
  • + + 100 credits / mo +
  • +
  • + + OpenAI models +
  • +
  • + + Claude models +
  • +
  • + + Chat support +
  • +
+
+ +
+

Pro

+

Higher limits

+
+ + {paymentInterval === "monthly" ? "$40" : "$400"} + + + {paymentInterval === "monthly" ? "/ month" : "/ year"} + +
+ + + +
    +
  • + + 300 credits / mo +
  • +
  • + + OpenAI models +
  • +
  • + + Claude models +
  • +
  • + + Chat support +
  • +
+
+
+
+ + ); +} + +export default PricingPlans;