show FAQ link only on dialog, not on pricing page

This commit is contained in:
Abi Raja 2024-07-22 15:50:10 -04:00
parent 97bd1c924a
commit b7985b9a4e
2 changed files with 18 additions and 6 deletions

View File

@ -7,7 +7,7 @@ const PricingPage: React.FC = () => {
return (
<div className="container mx-auto px-4 py-8">
<h1 className="text-3xl font-bold mb-6">Screenshot to Code Pricing</h1>
<PricingPlans />
<PricingPlans shouldShowFAQLink={false} />
{/* Spacer */}
<div className="text-center mt-8"></div>
<FAQs />

View File

@ -4,7 +4,11 @@ import React from "react";
import { Button } from "../../ui/button";
import useStripeCheckout from "./useStripeCheckout";
function PricingPlans() {
interface PricingPlansProps {
shouldShowFAQLink?: boolean;
}
function PricingPlans({ shouldShowFAQLink = true }: PricingPlansProps) {
const { checkout, isLoadingCheckout } = useStripeCheckout();
const [paymentInterval, setPaymentInterval] = React.useState<
"monthly" | "yearly"
@ -113,10 +117,18 @@ function PricingPlans() {
</div>
<p className="text-center text-xs text-gray-600 mt-1">
1 credit = 1 code generation. Cancel subscription at any time. <br />{" "}
<a href="/pricing" target="_blank" className="text-blue-900 underline">
See FAQs if you have additional questions
</a>{" "}
or contact support.
{shouldShowFAQLink && (
<>
<a
href="/pricing"
target="_blank"
className="text-blue-900 underline"
>
See FAQs if you have additional questions
</a>{" "}
or contact support.
</>
)}
</p>
</>
);